首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

静态编写//下面警告有有关问题吗?

2013-08-10 
静态编写//下面警告有问题吗????? warning C4518: “bool ” : 此处遇到意外的存储类或类型说明符;被忽略 wa

静态编写//下面警告有问题吗?????


 warning C4518: “bool ” : 此处遇到意外的存储类或类型说明符;
被忽略

 warning C4502: “链接规范”要求使用关键字“extern”,
并且该关键字必须在所有其他说明符之前

lib库
.h
bool  extern "C" __declspec(dllexport) initialize_lib_resource(const TCHAR* file_path);

.cpp
bool extern "C" initialize_lib_resource(const TCHAR* file_path)
{
return 1;
}



调用时,声明
extern "C" {
       #include "./lib/InterfaceCall.h"
}
#pragma comment(lib,"./lib/G_SongInfo_d.lib")

[解决办法]
extern "C" bool __declspec(dllexport) initialize_lib_resource(const TCHAR* file_path);

热点排行