主题:dll文件如何加上io.h文件头?
我编的DLL文件,预处理如下:
#include<stdio.h>
#include<io.h>
extern "C" __declspec(dllexport) void __stdcall read
(char *,short,long int,int,short *);
在下面定义的read函数中,要用到filelength命令。
------------------------
下面是调试结果:
点击make按钮,显示错误:
Build
[C++ Error] Unit1.cpp(11): E2337 Only one of a set of overloaded functions can be "C"
错误标记停在(char *,short,long int,int,short *);这一行上。
当我删掉#include<io.h>时,该故障消失了。但是,程序执行到filelength命令时,显示错误:[C++ Error] Unit1.cpp(32): E2268 Call to undefined function 'filelength'
请教大家:filelength命令与#include<io.h>语句如此“水火不相容”,我该怎么办呢?
#include<stdio.h>
#include<io.h>
extern "C" __declspec(dllexport) void __stdcall read
(char *,short,long int,int,short *);
在下面定义的read函数中,要用到filelength命令。
------------------------
下面是调试结果:
点击make按钮,显示错误:
Build
[C++ Error] Unit1.cpp(11): E2337 Only one of a set of overloaded functions can be "C"
错误标记停在(char *,short,long int,int,short *);这一行上。
当我删掉#include<io.h>时,该故障消失了。但是,程序执行到filelength命令时,显示错误:[C++ Error] Unit1.cpp(32): E2268 Call to undefined function 'filelength'
请教大家:filelength命令与#include<io.h>语句如此“水火不相容”,我该怎么办呢?