错误1error LNK2019: 无法解析的外部符号 _cltSocketDestory,该符号在函数 _main 中被引用
在动态库编辑的文件中添加
#ifdef __cplusplus
extern "C" {
#endif
__declspec(dllexport)
int cltSocketInit(void **handle /*out*/)
{
printf("cltSocketInit() begin\n");
printf("cltSocketInit() end\n");
return 0;
}
//客户端发报文
__declspec(dllexport)
int cltSocketSend(void *handle /*in*/, unsigned char *buf /*in*/, int buflen /*in*/)
{
return 0;
}
//客户端收报文
__declspec(dllexport)
int cltSocketRev(void *handle /*in*/, unsigned char *buf /*in*/, int *buflen /*in out*/)
{
return 0;
}
//客户端释放资源
__declspec(dllexport)
int cltSocketDestory(void *handle/*in*/)
{
return 0;
}
#ifdef __cplusplus
}
#endif
#endif