Vs. Net Runtime Library conflict solution

Source: Internet
Author: User
Tags import database

Cause of running library conflict:

When a third-party library is connected, the link library conflict may occur. This error may be caused by inconsistent runtime libraries used by third-party libraries and applications using the third-party libraries. (Vs project --> property-> C/C ++ --> code generation --> the Runtime Library can set the Runtime Library compilation mark)

Runtime Library compilation Tag:

Dynamic Link Library version:
/MD multithreaded DLL import database msvcrt. Lib
/MDD debug multithreaded DLL import data to msvcrtd. Lib
Static Link Library version:
/Ml single-threaded uses static library libc. Lib
/MLD debug single-threaded use static library libcd. Lib
/MT multithreaded uses the static library libcmt. Lib
/MTD debug multithreaded uses the static library libcmtd. Lib

Solution:

(1) find the name of the Runtime library used by the third-party library that conflicts with the current Runtime Library.

For example, the Runtime Library compilation used by our current application is marked as:/MDD

The third library used for compilation is marked as:/MTD

If the Lib file of the third library is used in the application, the error is

A symbolic mark has been defined in msvcrtd. Lib. The error file is libcmtd. Lib.

(2) Based on the file libcmtd. Lib where the error is located, we can turn to know that the Runtime Library compilation of the third-party library is marked as/MTD.

(3) At this time, vs project --> property-> C/C ++ --> code generation --> Runtime Library, and modify the compilation mark to/MTD.

(4) vs project --> properties-> linker --> additional options: Add:/nodefaultlib: msvcrtd

 

OK, generate again, and solve the problem. There is no running database conflict. In fact, this problem occurs because of inconsistent parameters during compilation. You only need to change the parameter consistency during the compilation of the two aspects.

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.