积极答复者
LNK2005如何解决

问题
-
nafxcw.lib(afxglobals.obj) : error LNK2005: "public: virtual __thiscall CMemDC::~CMemDC(void)" (??1CMemDC@@UAE@XZ) 已经在 GridCtrl.obj 中定义
这个怎么办啊?vs 2010下编译就出这个问题。这个项目已经在VS2008和VS2005上编译过了,应该不是项目代码的问题。
答案
-
动态链接MFC的项目不能静态链接静态链接MFC的项目
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 ChiYauModerator 2011年3月31日 8:07
全部回复
-
检查你是否连接了静态连接MFC的库
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP -
动态链接MFC的项目不能静态链接静态链接MFC的项目
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 ChiYauModerator 2011年3月31日 8:07