编译时候,在release版本下发现以下警告,看到警告总是不舒服的,于是在网上搜索,解决方案
: warning C4273: 'DownloadGameFile' : inconsistent dll linkage. dllexport assumed.
: warning C4273: 'StopDownload' : inconsistent dll linkage. dllexport assumed.
在download.h头文件中可以看到以下定义
#ifdef DOWNLOAD_EXPORTS
#define DOWNLOAD_API __declspec(dllexport)
#else
#define DOWNLOAD_API __declspec(dllimport)
#endif
解决方案:
在工程设置中,C/C++->General->Preprocessor definitions中加上DOWNLOAD_EXPORTS
这样警告就消除了