Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-936

RCC dynamic C++ source file fails to compile with precompiled header

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 2.7.1 (rev.20)
    • Fix Version/s: 2.8.1
    • Component/s: Build-time integration
    • Labels:
      None
    • Commits:
      a53d9f9016 (qt-labs/vstools/dev)

      Description

      Please note this issue affects version 2.7.1 (rev.20); was not an option.

      When compiling with a precompiled header the build fails to compile the C++ source file generated by RCC because of a mismatch between compile options:

      ```
      5> C:\qrc_qml.cpp : error C2855: command-line option '/Zc:referenceBinding' inconsistent with precompiled header
      5> C:\qrc_qml.cpp : error C2855: command-line option '/Zc:__cplusplus' inconsistent with precompiled header
      5> C:\qrc_qml.cpp : fatal error C1903: unable to recover from previous error(s); stopping compilation
      ```

      Qt VS Tools creates a separate compile task which seems to include some, but not all options when compared to application source files. This issue does not exist when generating the project with Qmake standalone. The qrc_qml.cpp is compiled along with application source files, and there is no compile option mismatch.

      I have tried adding these options ("/Zc:referenceBinding /Zc:__cplusplus") to "AdditionalOptions" on the QtRcc task but that has no affect.

      Expected result
      I can build my application with a precompiled header.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTVSADDINBUG-936
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              mecfc Miguel Costa
              Reporter:
              kbostelmann kbostelmann
              Votes:
              6 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes