Results 1 to 6 of 6

Thread: qmake default includes

  1. #1
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Thanks
    37
    Thanked 53 Times in 40 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default qmake default includes

    I recently installed qt-4.3 open source binary on windows xp. Whenever i do qmake -project && qmake && make , i get compilation failure due to wrong/missing bits directory in the default include list.
    Adding the appropriate include directory to the include list in the .pro file solves the problem.
    Is there anyway so that i can inform qmake to add this directory to include list as default while generating project files?
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  2. #2
    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: qmake default includes

    Which include directory are we talking about? It is advisable to run "qmake -project" only once at the beginning of the project, not every time while building the project.
    J-P Nurmi

  3. #3
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Thanks
    37
    Thanked 53 Times in 40 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qmake default includes

    The include directory which i add externally is like this
    INCLUDEPATH += d:\MinGWStudio\MinGW\include\c++\3.3.1\mingw32
    I guess i need to do this due to some wrong configuration of mingw while installing. But otherwise everything is ok.

    I won't do qmake -project every time. Actually i create some qt test programs and test using qmake. Always firing up notepad and editing pro file to just test program is irritating. Also i write new test programs often.

    So is there anyway i can do , so that file generated by qmake contains this include directory by default ?
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  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: qmake default includes

    Try adding it to <QTDIR>/mkspecs/win32-g++/qmake.conf.
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    Gopala Krishna (17th July 2007)

  6. #5
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Thanks
    37
    Thanked 53 Times in 40 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: qmake default includes

    It worked. Thanks. One small confirmation
    I think it shd be INCLUDEPATH = reqd dir instead of INCLUDEPATH += since the variable might not have been declared when qmake.conf is parsed. Am i right ?
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  7. #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: qmake default includes

    I think you can use "+=" on a non-existent variable and that's the way I would use it just to be sure not to overwrite anything that could have been set already.
    J-P Nurmi

Similar Threads

  1. Flex, Bison and qmake
    By Hydragyrum in forum Qt Programming
    Replies: 5
    Last Post: 2nd May 2011, 15:52
  2. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  3. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  4. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.