PDA

View Full Version : Including headers path



!Ci
5th August 2008, 08:48
I wanted to add new headers directory so I used INCLUDEPATH (+= /my/folder/) directive into .pro file. The problem is nothing happening - it doesn't add anything to compiler directives. What could be the reason of that situation. I didn't find any solution in the documentation.

DadaLee
5th August 2008, 09:06
Are you sure you have stored the header file in /my/folder/ ?
It' s absolute path. Maybe you want to add the relative path.

Then you sould qmake again.

!Ci
5th August 2008, 09:57
Are you sure you have stored the header file in /my/folder/ ?
It' s absolute path. Maybe you want to add the relative path.

Yes, I gave absolute path (this was only example I wrote before, I'm trying to add oracle headers - /usr/include/oracle/..... and it can't find occi.h)



Then you sould qmake again.

I did it also.

jpn
5th August 2008, 13:03
Exactly what did you write to the .pro file? In which exact directory is occi.h? How did you write the include directive? What does the corresponding compiler command look like, including all arguments?

!Ci
5th August 2008, 17:48
Exactly what did you write to the .pro file?

SUBDIRS += src
TEMPLATE = subdirs
CONFIG += warn_on \
qt \
thread

INCLUDEPATH += /usr/include/oracle/10.2.0.4/client


In which exact directory is occi.h?
Like above.


How did you write the include directive?
Normally as

#include <occi.h>


What does the corresponding compiler command look like, including all arguments?

g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include -I. -I. -o oracleconn.o oracleconn.cpp


Any ideas what could be wrong??

jpn
5th August 2008, 18:52
Try moving the INCLUDEPATH to src.pro.

!Ci
5th August 2008, 18:53
Ok I solved the problem. I had to add this directive but in next directory level (in src folder).

Is there a way to inherit that directive from the first .pro file?

spirit
5th August 2008, 19:00
try to use


include (pro_of_pri_file)

for including instractions from one pro/pri-file to another.