Results 1 to 8 of 8

Thread: Including headers path

  1. #1
    Join Date
    Jan 2006
    Location
    Rzeszow, POLAND
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Including headers path

    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.

  2. #2
    Join Date
    Jul 2008
    Location
    NanJing China
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Wink Re: Including headers path

    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.

  3. #3
    Join Date
    Jan 2006
    Location
    Rzeszow, POLAND
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Including headers path

    Quote Originally Posted by DadaLee View Post
    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)

    Quote Originally Posted by DadaLee View Post
    Then you sould qmake again.
    I did it also.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Including headers path

    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?
    J-P Nurmi

  5. #5
    Join Date
    Jan 2006
    Location
    Rzeszow, POLAND
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Including headers path

    Quote Originally Posted by jpn View Post
    Exactly what did you write to the .pro file?
    Qt Code:
    1. SUBDIRS += src
    2. TEMPLATE = subdirs
    3. CONFIG += warn_on \
    4. qt \
    5. thread
    6.  
    7. INCLUDEPATH += /usr/include/oracle/10.2.0.4/client
    To copy to clipboard, switch view to plain text mode 

    Quote Originally Posted by jpn View Post
    In which exact directory is occi.h?
    Like above.

    Quote Originally Posted by jpn View Post
    How did you write the include directive?
    Normally as
    Qt Code:
    1. #include <occi.h>
    To copy to clipboard, switch view to plain text mode 

    Quote Originally Posted by jpn View Post
    What does the corresponding compiler command look like, including all arguments?
    Qt Code:
    1. 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
    To copy to clipboard, switch view to plain text mode 

    Any ideas what could be wrong??

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Including headers path

    Try moving the INCLUDEPATH to src.pro.
    J-P Nurmi

  7. #7
    Join Date
    Jan 2006
    Location
    Rzeszow, POLAND
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Including headers path

    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?

  8. #8
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Including headers path

    try to use
    Qt Code:
    1. include (pro_of_pri_file)
    To copy to clipboard, switch view to plain text mode 
    for including instractions from one pro/pri-file to another.

Similar Threads

  1. deleting selected headers
    By ru_core in forum Qt Programming
    Replies: 3
    Last Post: 16th April 2008, 08:53
  2. how do I get the default picture path of qtopia 2.2
    By pencilren in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th September 2007, 10:01
  3. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 14:15
  4. Which path should I use?
    By Dark_Tower in forum Newbie
    Replies: 3
    Last Post: 8th April 2006, 13:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.