Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.2.7, 6.2.9, 6.5.3, 6.6.0 Beta4
-
Windows 10 22H2, MSVC 2019 x64
-
-
b289d669a (dev), ab971d249 (6.6), c6ec130a0 (6.5)
Description
MinGW kits do not seem to be affected.
Code
MyProject.pro
CONFIG += qt SOURCES += main.cpp
main.cpp
#include <QGuiApplication> int main(int, char**) { qDebug("Hello World"); }
Build Output
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\MyProject.exe @C:\Users\USER\AppData\Local\Temp\MyProject.exe.29120.2047.jom MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) debug\MyProject.exe : fatal error LNK1120: 1 unresolved externals
Workarounds
- Remove CONFIG += qt and clean the build folder, OR
- Add QT += entrypoint_private