fgalan
fgalan

Reputation: 12312

QtCreator doesn't find header files (.h) belonging to my project

I'm using QtCreator to develop a "plain" C++ based software (in particular, this one). By "plain" I mean my software is not using Qt libraries or any other Qt stuff appart from the IDE.

QtCreator version is 4.14.1.

Everything goes fine (building, running application, debugging, etc.) but the editor is reporting problems finding header files (i.e. .h files) belonging to my project, as shown in the screenshoot below:

enter image description here

Interesting to note that system headers (e.g. stdio.h) are correctly found.

So maybe I'm missing some piece of configuration in my project. First thing I thougth was the .includes added by QtCreator at project creation time (fiware-orion.includes in my case), which is like that:

src/lib/cache
src/lib/mongoBackend
src/lib/parseArgs
...

which are the places in which the header files are (e.g. src/lib/mongoBackend/MongoGlobal.h) so everything seems fine in that file...

Any idea or suggestion is really welcomed :)

Upvotes: 0

Views: 979

Answers (1)

fgalan
fgalan

Reputation: 12312

I think I found the answer myself just after publishing the question (use to happen :)

Adding to the .includes file this line:

src/lib

solved the problem.

It makes sense... as my header names are like mongoBackend/MongoGlobal.h then

src/lib + mongoBackend/MongoGlobal.h = src/lib/mongoBackend/MongoGlobal.h

Upvotes: 0

Related Questions