Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.6, 5.3.0
-
None
-
reproducible in QT 4.8.6 or QT 5.3.0 with both VisualStudio 2008 and 2013
-
dc612acdc6577594c8f61345cea2de549d7aae34
Description
If one want to put header and body of precompiled headers files in separate folder, Visual Studio compilation will fail. In fact, qmake do not generate visual studio project well.
PrecompiledHeaderFile attribute of precompiled body item in visual studio project is filled with file name only. It should take full path.
Both choice to resolve this issue :
- put your .h and .cpp in the same folder
- or modify qmake; replace this line in QMake qmake/generators/win32/msvc_objectmodel.cpp file :
CompilerTool.PrecompiledHeaderThrough = (isCPPFile ? Project->precompHFilename : QString("$(NOINHERIT)"));
by
CompilerTool.PrecompiledHeaderThrough = (isCPPFile ? Project->precompH : QString("$(NOINHERIT)"));
I have attached an example project.
Attachments
Issue Links
- resulted in
-
QTBUG-46679 [REG 5.4 -> 5.5.0beta] QMake Visual Studio generator - wrong option value for precompiled header
- Closed