Results 1 to 6 of 6

Thread: qmake doesn't respect QMAKESPEC variable

  1. #1
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default qmake doesn't respect QMAKESPEC variable

    I wanted to use vc++ compiler from within Qt Creator. Therefore I set QMAKESPEC environment variable in Projects/Build Settings/Debug to c:\qt\4.5.2-vc\mkspecs\win32-msvc2008 where I have qt compiled with vc++ compiler.
    But when building a project I get this error
    Starting: C:/qt/4.5.2-vc/bin/qmake.exe D:/projects/qt-test/formextractor.pro -spec Z:/qt-src/mkspecs/win32-g++ -r
    Failure to read QMAKESPEC conf file z:/qt-src/mkspecs/win32-g++\qmake.conf.

    Why qmake doesn't read QMAKESPEC variable and instead keeps using z:/qt-src/mkspecs/win32-g++\qmake.conf as a value of spec option?
    How can I fix this?

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake doesn't respect QMAKESPEC variable

    Quote Originally Posted by piotr.dobrogost View Post
    Why qmake doesn't read QMAKESPEC variable and instead keeps using z:/qt-src/mkspecs/win32-g++\qmake.conf as a value of spec option?
    qmake does what it is told. Considering the output it is clear that qmake is invoked with a -spec parameter which overrides any environment variable.

    Quote Originally Posted by piotr.dobrogost View Post
    How can I fix this?
    Beat your IDE to death until it understands that it should not specify a QMAKESPEC when invoking qmake (that probably boils down to some settings).

    edit: are you really setting an environment variable btw (as opposed to ome settings of Qt Creator)? Because it might just be that you set the mkspec properly for debug mode (inferred from your explanations) yet are building in release mode...
    Current Qt projects : QCodeEdit, RotiDeCode

  3. #3
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qmake doesn't respect QMAKESPEC variable

    It happens when I'm building debugging helper using built-in function of Qt Creator (Tools/Options/Qt4/Qt Versions/Rebuild)...
    From what I see creator builds it using makefiles in /qtc-debugging-helper folder. These makefiles had the wrong path (it was the original path of qt's source when building qt). I changed it to the proper one but when rebuilding creator still uses the old, wrong one. I have no idea where does it take it from.
    Any ideas?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qmake doesn't respect QMAKESPEC variable

    Why don't you just change the contents of mkspecs/default/qmake.conf?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2009
    Posts
    133
    Thanks
    10
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qmake doesn't respect QMAKESPEC variable

    Quote Originally Posted by wysota View Post
    Why don't you just change the contents of mkspecs/default/qmake.conf?
    How could I know I should change this file?
    Where can I find information on setting creator to work with vc?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qmake doesn't respect QMAKESPEC variable

    Quote Originally Posted by piotr.dobrogost View Post
    How could I know I should change this file?
    Open it and read it through. It's trivial to guess what you are looking for, there is only one path there. Think what you have to do with the file to get it to work with a different compiler and different path by default and just do it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. qmake sux a lot
    By singermornings in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 08:33
  2. qmake - how to extract number from variable
    By Vanir in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2009, 18:12
  3. nmake error during .pro compiling
    By mattia in forum Installation and Deployment
    Replies: 5
    Last Post: 18th June 2008, 10:15
  4. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  5. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15

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.