0
votes

I have include dir in my project which contains cpp header files:

./projectName/include/**/*.hpp

and src dir with cpp files:

./projectName/src/**/*.cpp

When i create .pro file like that:

SOURCES += \
src/dir1/name1.cpp \
...
src/dirN/nameN.cpp

HEADERS += \
include/dir1/name1.hpp \
...
include/dirN/nameN.hpp

include preprocessor instruction highlighted as containing error:

#include "dir1/name1.hpp"

But in my cmake build configuration file such includes work well.

How to make them work in qt creator?

1

1 Answers

0
votes

Write the larger path #include "include/dir1/name1.hpp"

Or add the absolute path to the .pro file in INCLUDEPATH variable, like INCLUDEPATH += "C:\path\to\your\stuff\include"