Sqlite c ++ libraries installation problems encountered
Compiler environment, vs2017 + 64bit + MFC gui
Question 1
Item file line severity codes prohibit the display state
error C1047
object or library file "D: \ open_source \ sqlite3 \ sqlite3pp-master \ headeronly_src \ sqlite3.lib" is using to create other objects than to create the old compiler compiler used
; rebuild the old objects and libraries SplitDemo D: _sync_work3 \ SplitDemo \ lINK 1 \ rst_DL_3win
solution: Release mode -> properties -> General -> project defaults -> whole program optimization will default entry here "link time Code generation "to" no whole program optimization, then you can run.
original article link
Question 2
Severity code Item file prohibits line displays the status of
the warning LNK4098 default libraries "LIBCMT" use conflicts with other libraries; use / NODEFAULTLIB: library SplitDemo D: _sync_work3 \ rst_DL_3win \ SplitDemo \ LINK 1
This is a two lib files define the same function caused need to shield one, the solution is as follows:
Original article
article is very long, I do not copy and paste
Question 3
LNK4098 default conflict libraries with other libraries; use / NODEFAULTLIB: library
severity code Item file prohibits the display line status
error C1189 #error: Building MFC application with / MD [d] (CRT dll version) requires MFC shared dll version .
Please do Not #define _AFXDLL or use / the MD [D] SplitDemo C: \ Program Files (the x86) \ Microsoft Visual Studio \ 2017 \ Community \ VC \ Tools \ MSVC \ 14.16.27023 \ atlmfc \ the include \ afx.h 24
VS2013 Run the MFC program error
LINK: warning LNK4098: default libraries "MSVCRT" use conflicts with other libraries; use / NODEFAULTLIB: library
Solution:
compile options are set as follows:
1, [Project] -> [Property] -> [Configuration Properties] -> [C / C ++] -> [Code Generator] -> [run-time library], set to "multi-threaded DLL (/ MD)
2, [Project] -> [Properties] -> [Configuration Properties] -> [Connector] -> [Input] -> [] ignore the specified library, enter: MSVCRT.LIB
or:
[Project] -> [Property] -> [configuration properties] -> [connector] -> [command line], type: / NODEFAULTLIB: msvcrt.lib