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

Add support for wmain() on Windows

    XMLWordPrintable

Details

    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

        1. unicode-test.tar.gz
          0.7 kB
          Ivan Romanov

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes