Details
-
Bug
-
Resolution: Done
-
P2: Important
-
2.7.1 (rev.20)
-
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
- depends on
-
QTVSADDINBUG-950 Get Qt build settings from 'vcapp' qmake template
- Closed
- relates to
-
QTVSADDINBUG-924 Template project Qt Quick Application using C++14 standard by default even with Qt 6
- Closed
-
QTVSADDINBUG-992 QtRcc task fails when using precompiled headers
- Reported
-
QTVSADDINBUG-947 Qt Resource Compiler won't set the required flags
- Closed