现在按照你的列子重写了程序,但编译是在下列语句出现问题:
#ifdef __cplusplus
extern "C" { //DLL 导出的接口函数从这里开始
#endif
//---------------------------------------------------------------------------
int _export WINAPI OpenLock(int iPortNo)
{
return MyDll.OpenLock(iPortNo);
}
//---------------------------------------------------------------------------
void _export WINAPI CloseLock(viod) //就在这个地方出现问题???
{
MyDll.CloseLock();
}
//---------------------------------------------------------------------
提示信息如下:
Build
[C++ Warning] UnitDll.cpp(86): W8054 Style of function definition is now obsolete
[C++ Error] UnitDll.cpp(87): E2337 Only one of a set of overloaded functions can be "C"
--------------------next---------------------
阅读(1170) | 评论(0) | 转发(0) |