Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-46118

Add support for wmain() on Windows

XMLWordPrintable

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            taurus Ivan Romanov
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes