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.