Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-30189

Building QtCreator fails with MinGW and BUILD_WITH_PCH=OFF

    XMLWordPrintable

Details

    • Windows
    • 5be811013 (master)

    Description

      Building QtCreator fails with MinGW and BUILD_WITH_PCH=OFF: FILE_ID_INFO is used by devicefileaccess.cpp, but not defined. This is because FILE_ID_INFO is Window 8 API, but MinGW assumes Windows 7 API by default. With BUILD_WITH_PCH=ON Windows 8 mode is enabled. This also needs to be done for builds without precompiled headers. Disabling precompiled headers is useful to make CCache work.

      Possible fix that I am testing right now:

      diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake
      index 9a6f06b73e..27ebbf2fb4 100644
      --- a/cmake/QtCreatorAPIInternal.cmake
      +++ b/cmake/QtCreatorAPIInternal.cmake
      @@ -31,7 +31,10 @@ if (WIN32)
      
         if (NOT BUILD_WITH_PCH)
           list(APPEND DEFAULT_DEFINES
      -      WIN32_LEAN_AND_MEAN)
      +      WIN32_LEAN_AND_MEAN
      +      WINVER=0x0602
      +      _WIN32_WINNT=0x0602
      +    )
         endif()
       endif()
      

      Attachments

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

        Activity

          People

            cadam Cristian Adam
            hasselmm Mathias Hasselmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes