Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0
Description
This suggestion based on QTBUG-46097.
In Windowses world can be various entry points to program not only main(). Possible entry point names:
- main() - console ANSI application
- wmain() - console Unicode application
- WinMain() - gui ANSI application
- wWinMain() - gui Unicode application
Qt targeted to creating GUI applications. So it allow to have regular main() in Windows applications. Qt internally implements WinMain() function which calls main().
ANSI functions are obsolete, they from the past (Windowses 9x). In modern Windowses Unicode is used. wmain() instead of main() and wWinMain() instead of WinMain(). So Qt now supports only obsolete ANSI version.
Also MinGW-w64 FAQ provides instruction how to build correct Unicode application. It requires -municode flag for linker which change entry point of application. So now this FAQ can't be used to build correct Unicode application.
In attachments test case correct Unicode application which should be build with Qt.
Attachments
Issue Links
- relates to
-
QTBUG-47023 [Regression] Windows: Crash in QApplication constructor when using wide main passing a fake argv array (console application)
- Closed
- resulted from
-
QTBUG-46097 cmake: no wWinMain when compiling as unicode
- Closed