使用VS2010编写DLL工程时出现如下错误
Creating library E:\Product1\DlagDll\Debug\DlagDll.lib and object E:\Product1\DlagDll\Debug\DlagDll.exp
1>ReadUserInfo.obj : error LNK2019: unresolved external symbol “_declspec(dllimport) const CReadUserInfo::`vftable’” (__imp??_7CReadUserInfo@@6B@) referenced in function “public: __thiscall CReadUserInfo::CReadUserInfo(void)” (??0CReadUserInfo@@QAE@XZ)
1>E:\Product1\DlagDll\Debug\DlagDll.dll : fatal error LNK1120: 1 unresolved externals
在VS2010工程的project->setting->C/C++->Preprocessor definitions中添加宏定义即可
本文详细介绍了在使用VS2010编写DLL工程时遇到创建库和对象文件时出现的LNK2019错误,并提供了在预处理器定义中添加宏定义的方法来解决此问题。
36万+

被折叠的 条评论
为什么被折叠?



