Results 1 to 3 of 3

Thread: questions about setting the global include path that could be used in every project

  1. #1
    Join Date
    Aug 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default questions about setting the global include path that could be used in every project

    Hi ,administrator.
    Recently I am using QT Creator to develop some applications. I Want to set the include path and library path for all projects i created.
    For example , i usually needs to use the boost library , currently i have to add the library path and include path while i am creating a new project, when the project is huge, this seems a little boring.
    Is there one way to set the include path and library path that could be applied for all the projects?
    I tried eclipse for C++ version,it seems that eclipse will auto load the CPLUS_INCLUDE_PATH defined in .bashrc.
    Can QT Creator do this ? If it can ,how could i set it ?

  2. #2
    Join Date
    Aug 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: questions about setting the global include path that could be used in every proje

    no body knows?

  3. #3
    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: questions about setting the global include path that could be used in every proje

    Well, as for libs you can always use LD_LIBRARY_PATH (for Linux) and DYLD_LIBRARY_PATH (for Mac).
    As for includes you can create your own system variable which will contain path to includes. Then you can use this variable in your pro-file. Something like this:
    pro-file
    HEADERS += ...\
    $$(MY_INCLUDE_PATH)/myheader.h
    ...
    in QtCreator project's settings you should declare this variable or export it from command line (export MY_INCLUDE_PATH=~/projects/mylib/include) and then run QtCreator.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. LIBS and INCLUDE PATH
    By 21did21 in forum Qwt
    Replies: 11
    Last Post: 21st June 2012, 16:44
  2. Replies: 4
    Last Post: 29th July 2010, 05:07
  3. Setting a global variable
    By Windsoarer in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2010, 22:37
  4. Include path question
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 13:21
  5. g++ include path
    By LMZ in forum Newbie
    Replies: 2
    Last Post: 8th May 2007, 13:45

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.