【发布时间】:2012-10-06 13:44:57
【问题描述】:
我正在尝试在 Microsoft Visual Studio 2012 中编译我的 Visual C++ 项目(使用 MFC),但它返回以下错误:
error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMTD.lib(delete2.obj)
error LNK1169: one or more multiply defined symbols found
所以我搜索了一下,找到了这个页面: http://support.microsoft.com/?scid=kb%3Ben-us%3B148652&x=13&y=8 我尝试了解决方案一,但“忽略库”框不存在,对象/库模块框也不存在。对于 Ignore Libraries,我找到了 Ignore specific library,但跳过第五步只会给我 17xx 错误。
我在 Google 上搜索了很多,但总是回到同一页面,如何在 Visual Studio 2012 中解决此问题?
【问题讨论】:
-
您是否链接到任何非系统库,例如提升?
-
我不认为我是。我使用的是 Kintect、MFC 和 Windows。
-
您是否尝试过更改运行时库?例如在 C/C++-> 使用多线程调试 DLL (/MDd) 生成代码。
标签: c++ mfc linker visual-studio-2012