01 LNK2038: Mismatch detected for 'RuntimeLibrary'

Problem Description: error LNK2038: A mismatch was detected for 'RuntimeLibrary'

qtmian.lib(qtmain_win.obj): error LNK2038: Mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' does not match value 'MT_StaticRelease'

Solution (qtmian.lib error reported by method 3)

Method 1: Modify the VS project runtime configuration

In VS, change Project -> Properties -> C/C++ -> Code Generation -> Runtime library to /MT (release is changed to /MT, debug is changed to /MTd.
insert image description here

Method 2: Modify the VS+QT project runtime configuration

Open the project in VS -> Properties -> Qt Resource Compiler -> Override C/C++, modify the value of Running Library to Multi-threaded (MT) and save it.
insert image description here

Method 3: Add /ENTRY: "mainCRTStartup to the command line

Add a sentence to the command line in the linker: /ENTRY: "mainCRTStartup"
insert image description here

Guess you like

Origin blog.csdn.net/pointerz_zyz/article/details/128820353