My IDE: Visual Studio 2010, I use the Qt add-in for VS, Qt ver. 4.8.1
I ran into a problem when trying to create a precompiled header (pch) in my Qt project.
My general approach for creating pch in a project without Qt:
1. Create a title,
2. Include files that will be precompiled in the header.
3. For each source file in the project state in its properties, if it will use pch; 4. For one source file in the state of creation of the pch project; 5. Include pch in all source files.
How these steps failed for the Qt project. I decided that this was due to pch and should be included in all files created by MOC.
I read the QtAssistant article on precompiled headers and did the following:
1. Created header file; 2. For all .cpp files in the project set option, use pch and for one create 3. Converted to the project created by qmake
4. I ran qmake -project
5. I modified the generated .pro file, here it is:
TEMPLATE = app TARGET = DEPENDPATH += . GeneratedFiles INCLUDEPATH += . PRECOMPILED_HEADER = StdAfx.h QT += network
What am I doing wrong?
source share