Error lnk2005: "Void * _ cdecl operator new (unsigned INT )"(?? 2 @ yapaxi @ Z) the error lnk2005: "Void _ cdecl operator Delete (void *)"(?? 3 @ yaxpax @ Z) has been defined in libcmtd. Lib (dbgdel. OBJ)
Error lnk2005: "Void * _ cdecl operator new [] (unsigned INT )"(?? _ U @ yapaxi @ Z) has been defined in libcmtd. Lib (new2.obj)
Error lnk2005: "Void _ cdecl operator Delete [] (void *)"(?? _ V @ yaxpax @ Z) has been defined in libcmtd. Lib (delete2.obj)
I searched the internet for the conflict between the CRT Library and the MFC Library. The solution is: Program First link nafxcwd. Lib, then link libcmtd. Lib
You 've got to change the order inwhich the libraries are linked. This is a bit tricky, since the library are linked automatically, without you explicitly specifying them.
So, first step, tell the linker to ignore the implicit libraries: Project/setting/linker, input tab, and put "nafxcwd. lib libcmtd. lib "in the" libraries to ignore "box.
Next, on the same page, in the object/library modules box, put the same to libraries. (In you still get the same error, try reversing them on this line)
--
Chinese
Project -- Property --- connector --- Input
Additional dependency space nafxcwd. Lib libcmtd. Lib
Ignore specified library space nafxcwd. Lib libcmtd. Lib
Clear the project. Recompile. Done