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?
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?