[SOLVED] QT creator can't find added headers when building
-
Hi,
In my project i must add already existing .h, .cpp and .nsmap files.
I right clicked on my project name>add existing file, the files are in the project and are in the .pro file too. (the files are not in the project folder on the disk (in /home/name/appli, they are in a folder on the desktop).I clean my project and then try to build it but i have errors like :
/home/spi/ChargePoint/main.cpp:3: soapH.h: No such file or directoryDid i miss a manipulation when adding the files or maybe qt creator don't like when the files are so far on the hard drive, or another thing ?
-
AFAIK, If the .h files are not in the same folder as the .cpp files that need them, then you need to tell the project where to find the .h files. To do this, open your .pro file and adding something like this:
INCLUDEPATH += \ /home/name/appli \ /desktopfolder/myhfiles \ <additional paths to other h files>
That should do the trick.
-
Ok, i will try, thank you !
EDIT: Seems to work.
-
Glad to have helped!
If your problem is solved, you should edit the original post (only you can do this) and add the [SOLVED] prefix to the thread title so that is shows up as SOLVED in the table of contents, e.g. change the title of your post to be:
[SOLVED] QT creator can't find added headers when building