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

    • Bug
    • Resolution: Done
    • P2: Important
    • 2.8.1
    • 2.7.1 (rev.20)
    • Build-time integration
    • None
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: