主题:求助、急急 一个关于动态链接库的问题,请高手赐教
我是一个VC新手,请高手给于指点
我在引用他人的一个建立IO端口操作的动态链接库,编译时总是出现错误:
错误提示如下:
IO.dll - 1 error(s), 0 warning(s)
源程序是:
//IO.CPP
int WINAPI DLLMain(HINSTANCEhinstance,DWORD dwreason PVOID PVReserved)
{
return TRUE;
}
EXPORT int CALLBACK port_intput(int portNum)
{
return inp(portNum);
}
EXPORT int CALLBACK port_output(int portNum,int portData){
outp(int portNum,int portData);
return 0;
}
//IO.H
Extern "C" declspec(dllexport)
#define Export extern "C" declspec(dllexport)
EXPORT int CALLBACK Port input (int portNum)
EXPORT int CALLBACK Port input (int portNum,int portData);
//IO.DEF
LIBRARY "IO"
DESCRIPTION 'I/O read and write Dynamic Link Library'
EXPORTS
Port input @1
Port output @2
或提示:
IO.obj - 1 error(s), 0 warning(s)
我在引用他人的一个建立IO端口操作的动态链接库,编译时总是出现错误:
错误提示如下:
IO.dll - 1 error(s), 0 warning(s)
源程序是:
//IO.CPP
int WINAPI DLLMain(HINSTANCEhinstance,DWORD dwreason PVOID PVReserved)
{
return TRUE;
}
EXPORT int CALLBACK port_intput(int portNum)
{
return inp(portNum);
}
EXPORT int CALLBACK port_output(int portNum,int portData){
outp(int portNum,int portData);
return 0;
}
//IO.H
Extern "C" declspec(dllexport)
#define Export extern "C" declspec(dllexport)
EXPORT int CALLBACK Port input (int portNum)
EXPORT int CALLBACK Port input (int portNum,int portData);
//IO.DEF
LIBRARY "IO"
DESCRIPTION 'I/O read and write Dynamic Link Library'
EXPORTS
Port input @1
Port output @2
或提示:
IO.obj - 1 error(s), 0 warning(s)