我写一个程序时调用一个DLL,编译时出现这一句:
error C2598: linkage specification must be at global scope
对应指着的语句为:
extern "C" __declspec(dllimport)int ReadPort(unsigned DataAddress, int Data);
怎么改呢?
error C2598: linkage specification must be at global scope
对应指着的语句为:
extern "C" __declspec(dllimport)int ReadPort(unsigned DataAddress, int Data);
怎么改呢?
在里边写出dll的输出的函数
这个应该和*.def文件的内容无关。*.def只是用来匹配输出函数名的,与此编译错误无关。
猜想你的int ReadPort(unsigned DataAddress, int Data)可能不是一个全局函数。
能不能把你的DLL的结构贴出来。
<url>http://www.yangning.com/cgi-bin/topic.cgi?forum=1&topic=33&show=0<url>