error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.
2016-02-24 15:23
656 查看
在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 in
LIBCMT.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
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).
环境:vs2012 中 在非MFC程序(使用standard window library)中,添加MFC支持,静态连接MFC库 发生以下错误
Error 1
error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in
LIBCMT.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).
相关文章推荐
- linux回到上次目录与历史命令查找快捷方式
- linux下源的相关笔记(suse)
- apache 启动脚本加入系统服务列表
- linux apache 源码包安装与配置
- topK问题
- FOR循环删除文件后缀名
- Hadoop基础之RPC机制以及HDFS源码分析
- linux下vi或vim操作Found a swap file by the name的原因及解决方法
- 分布式读写分离架构
- linux下c语言简单线程池实现
- Nginx重新编译添加模块
- 对网站的代码采集实例
- linux-shell-cd
- centos7.0 阿里巴巴学生服务器搭配环境实录(2)--tomcat环境搭建
- linux之sed用法
- Linux系统日志
- 转载:Linux下简单makefile编写示例
- MYSQL5.5源码安装 linux下
- linux练习题01
- 修改eclipse中tomcat启动默认超时时间