K
K
kozura2017-02-15 13:48:37
Qt
kozura, 2017-02-15 13:48:37

Qmake not using precompiled headers?

C++
Project The project uses a precompiled header
. Everything works as it should.
We add a *.c file to the project - the pre-copied header gets into C, because participates in the assembly
How to exclude precompilation for specific files?
In VS it is in the properties for each file, but I need it for pro or pri. (:

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mercury13, 2017-02-15
@kozura

According to the Qt documentation, you can't.
But you can exclude C++ from precompilation by a simple method.

// Add C includes here

#if defined __cplusplus
// Add C++ includes here
#include <stdlib>
#include <iostream>
#include <vector>
#include <QApplication> // Qt includes
#include <QPushButton>
#include <QLabel>
#include "thirdparty/include/libmain.h"
#include "my_stable_class.h"
...
#endif

doc.qt.io/qt-5/qmake-precompiledheaders.html
It came in handy myself (however, on MinGW, not on MSVC).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question