EVC4.0编译错误:LNK2005

当使用EVC4.0(SP4)编译程序,出现如下类似错误时: uafxwced.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in coredll.lib(COREDLL.dll) 可以采用以下方法解决:

1. 打开Project->Settings对话框,在link选项卡的Project Options框内加入: "/verbose:lib"。

2. 在project->settings->link的Objects/library modules框中输入uafxwced.lib。

问题解决。 注意:要把uafxwced.lib放到其它库文件名的最前面。

MS提供的的解决方法的网址: http://support.microsoft.com/kb/148652/zh-cn

原文地址:https://www.cnblogs.com/91program/p/5244092.html