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

Some MinGW distributions need MINGW_HAS_SECURE_API to compile Qt

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P4: Low
    • 5.11.2
    • 5.10.1, 5.11.1
    • Build System
    • None
    • Windows
    • 780dc2291bc0e114bab8b9ccd8706708f6b47270

    Description

      Recent version of MinGW need MINGW_HAS_SECURE_API to be defined to 1 in order to provide secure functions (like _wgetenv_s, used in th coreapi/global/global.cpp file).

      Adding such definition in the correct files (currently: qtbase/qmakespecs/win32-g+/qplateformdefs.h and qtbase/qmakespecs/win32-g+/qmake.conf) will allow you to use recent 64bits version of MinGW (like the newen distro, which is likely up to date with Gcc versions).

      Even if i undersand you cannot be completely up-to-date with all Gcc versions, passing from Gcc-5.3.0 (which is three year old for now) to a more recent version (like 7.2.0 or 7.3.0 like the nuwen distro) could be very profitable, since those version are automatiquely at least configured to use C++14.

      And more: giving ability to compile application in 64bits mode could be benfic for everyone

      Corrected files could look like those i join to this ticket (sorry if i don't provide a patch )

      Attachments

        1. mingw-w64+gcc.sh
          3 kB
        2. qmake.conf
          3 kB
        3. qplatformdefs.h
          5 kB
        4. qtbug67443_510.diff
          1 kB
        5. qtbug67443_511.diff
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kkohne Kai Köhne
            philippe-dunski philippe dunski
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes