"Void _ cdecl operator Delete [] (void *)"(?? _ V @ yaxpax @ Z) has been set in libcmtd. Lib (delete2.obj)

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.