Results 1 to 5 of 5

Thread: Paths & enviroment settings

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Location
    Midlands UK
    Posts
    62
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 9 Times in 6 Posts

    Default Paths & enviroment settings

    Hi all,

    I develop on 4 different computers and my work files start at different paths on each box but follow the same sub directory structure from then on. Due to the piles of programs I keep adding I need some sort of variable that can be set once that points to my work directories.

    This is what I have tried at the moment

    (at a command prompt)

    qmake -set MY_DIR C:\Documents and Settings\User3\My Documents\Qt\Components

    (where the path is different for each machine, but only has to be done once on each)

    I can then use $$[MY_DIR] in any .pro files to substitute the path for that machine
    (note, due to the spaces in the path I have to use another reference in the .pro files like this: MYDIR = "$$[MY_DIR]" and then use $$MYDIR instead)

    This still leaves a problem in the program .cpp and .h files since the path is not recognised by the #include <program.h> lines and causes the syntax checker and code completer to fail (setting INCLUDEPATH += $$MYDIR does not help)

    Programs will compile with the above setup but I really want the syntax checker and code completer to work.

    Can anybody point out the setting I need to do this ?

    SteveH

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: Paths & enviroment settings

    It sounds to me that [WIKI]Current working directory[/WIKI] could be of interest (then you have to put the exe "relative" to the working documents). Or simple hard code some paths or routine on where to look for and if they fail to locate the documents provide a settings dialog where one can define the path (QSettings).

  3. #3
    Join Date
    Sep 2010
    Posts
    145
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 18 Times in 17 Posts

    Default Re: Paths & enviroment settings

    Why not setup the environment and launch Creator from a batch file? Take a look at LIB and INCLUDE (if you use the visual studio compiler). In Creator goto Projects->Build Settings->Build Environment->Details to see what I mean.

Similar Threads

  1. Config QT Enviroment For Embedded ?
    By Thành Viên Mới in forum Newbie
    Replies: 1
    Last Post: 4th November 2010, 09:42
  2. Making MySQL plugin work on a windows x86 enviroment
    By Baasie in forum Installation and Deployment
    Replies: 1
    Last Post: 2nd September 2009, 15:15
  3. How to include ActiveQt in my Qt development enviroment??
    By Cantora in forum Installation and Deployment
    Replies: 0
    Last Post: 10th June 2009, 09:57
  4. include paths
    By altec in forum Installation and Deployment
    Replies: 0
    Last Post: 8th August 2008, 11:59
  5. How to set paths?
    By hoborg in forum Installation and Deployment
    Replies: 11
    Last Post: 24th February 2006, 19:08

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
  •  
Qt is a trademark of The Qt Company.