Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.0.0
-
None
-
-
753199437943e2a89e458136fd11a5a43443b280 (qt/qtbase/dev) 34cf8355687fc0c0f8544c3ccb3e6f9c05621955 (qt/qtbase/6.2)
Description
VRonin discovered a problem that in some cases linking of an executable fails with Qt6/CMake and MinGW due to the missing symbol 'WinMain'. The discussion can be found in the forum. The code is on github but I can attach them if you want.
The reason seems to be that libQt6EntryPoint.a is not added after -lmingw32.
This only happens when the created library links PRIVATE against all Qt libraries and then the executable links against this library and the Qt libraries. As soon as the library links PUBLIC against the Qt libraries all is fine.
I tried to dig through the cmake scripts but got stuck at Qt6EntryPoints.cmake - for some reason INTERFACE_LINK_LIBRARIES for Qt6::EntryPointImplementation is empty...