Mariusz Jaskółka
Mariusz Jaskółka

Reputation: 4492

How to remove project's root dir from include path in qmake

The default behavior for qmake is to add project's root path to include path. In Makefile it generates something like:

INCPATH       = -I..\bug -I. -I..\..\Qt\Qt5.8.0\5.8\mingw53_32\mkspecs\win32-g++ 

where "bug" is the name of the project. I don't want "-I." part. How can I remove this in .pro file?

I tried:

INCLUDEPATH -= "."

but it changes nothing.

Detailed explanation: My project compiles fine on Linux, but on Windows (mingw) it fails to compile. After deep research I realized that there is file named "process.h" somewhere included in standard C++ library (string.h). The problem was that in my project there was a file with exactly the same name. And paradoxically the file from my project was included to the standard library's header(!!). That behavior causes string header file fail to compile.

Upvotes: 1

Views: 884

Answers (1)

Mariusz Jaskółka
Mariusz Jaskółka

Reputation: 4492

There's appriopriate config option:

CONFIG += no_include_pwd

Upvotes: 2

Related Questions