Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Conflicts in Release Version

Status
Not open for further replies.

allenpm

Programmer
Nov 1, 2001
1
US
I have a program that compiles and links fine in the Debug version, but when I try to build the Release version I get the following linker errors:
nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in libcmt.lib(new.obj)
nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in libcmt.lib(delete.obj)
I tried alternately eliminating libcmt.lib and nafxcw.lib from the link, but in each case I got tons of unsatisfied references. I am linking with some external libraries, but even when I remove all those libraries from the link, I still get the linker conflicts. How can I make the linker happy?
 
Copy the necessary files that are in the "Debug" folder to the "Release". If there are none, make sure that the link options are the same for both debug and release under project settings

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top