error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
来源:互联网 发布:淘宝网茵曼女装 编辑:程序博客网 时间:2024/06/06 09:28
在vs2012 中将程序改为release 版本 点击所选项目--》properties-----》Configurations: 中选择release 然后从新编译工程即可;
环境:vs2012 中 在非MFC程序(使用standard window library)中,添加MFC支持,静态连接MFC库 发生以下错误
Error 1 error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined inLIBCMT.lib(new.obj)C:\Users\Administrator\Desktop\Tracker_release版本\Tracker删减版(无人脸检测)\Tracker\uafxcw.lib(afxmem.obj)
Error 3 error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmt.lib(newaop.obj)C:\Users\Administrator\Desktop\Tracker_release版本\Tracker删减版(无人脸检测)\Tracker\uafxcw.lib(afxmem.obj)
Error 2 error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMT.lib(delete.obj)C:\Users\Administrator\Desktop\Tracker_release版本\Tracker删减版(无人脸检测)\Tracker\uafxcw.lib(afxmem.obj)
Error 4 error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMT.lib(delete2.obj)C:\Users\Administrator\Desktop\Tracker_release版本\Tracker删减版(无人脸检测)\Tracker\uafxcw.lib(afxmem.obj)
解决方案:参考:https://support.microsoft.com/en-us/kb/148652
Solution One: Force Linker to Link Libraries in Correct Order
- On the Project menu, click Settings.
- In the Settings For view of the Project Settings dialog box, click to select the project configuration that is getting the link errors.
- On the Link tab, click to select Input in the Category combo box.
- In the Ignore Specific Default libraries box, insert the library names (for my example,uafxcw.lib;LIBCMT.lib).
Note The linker command-line equivalent in /NOD:<library name>. - In the Additional Dependencies box, insert the library names. You must make sure that these are listed in order and as the first two libraries in the line (for my example,uafxcw.lib;LIBCMT.lib).
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
- LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.lib
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.lib(new.obj)链接错误!
- “void * __cdecl operator new(unsigned int)”(??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(new
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(ne
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(ne
- uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
- nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
- nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
- 调试错误的解决:error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(new.obj) 中定义
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMTD.lib(new.obj) 中定义
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMTD.lib(new.obj) 中
- Java泛型通配符解惑
- c# virtual详解
- 【C++】低版本VS程序使用高版本打开的问题
- 阮一峰博客十年2
- HighCharts入门
- error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
- 使用Caffe对图像做训练、分类的流程总结
- spring No default constructor found; nested exception is java.lang.NoSuchMethodException: com.slj.mo
- Xcode Svn配置
- linux-shell-cd
- Js基础二(字面量、typeof、所类型的boolean值)
- 虚拟机网络模式介绍与说明
- 周记(cas初识)
- 百度地图学习笔记 拖拽标记