Results 1 to 6 of 6

Thread: qmake enviroment variables

  1. #1
    Join Date
    Feb 2011
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy qmake enviroment variables

    Hey guys,

    I have done following steps :

    - I downloaded "qt-everywhere-opensource-src-4.7.1.zip"
    - I compiled it with mingw with gcc version 4.5.2
    - I successfully compiled my first code.

    - I suddenly wanted to rename the Qt directory to something else. At this step nothing worked !
    - Using online resources I did "qmake -query" and I noticed that if I change the name of Qt installation nothing would work since the internal variables are set to that. I used "qmake -set <variable> <value>" to fix this and I set all variable I saw with "qmake -query" to the new directory (the new name) .

    - I am not yet able to get "qmake" work
    - when I do "qmake -query" I see the old and new environment variables listed.
    - I tried to find out where these variables are saved, but so far nothing found. I guess they are somewhere encoded. in the qmake manual it says these variables are persistent ! so if they are persistent there should be a way to delete/set them.

    To be more precise : "qmake" generates "Makefile" which contains include/lib paths. These paths are set using the environment variables of "qmake". The Include/Lib paths are still pointed to the old paths not the new ones I set ! That's why I could not compile my code again.

    FYI : I could not compile my code that used "fstream" with the executable SDK provided by Qt since there are things broken in their mingw build. so I had/have to compile the Qt again
    Last edited by qtarian; 28th February 2011 at 12:30.

  2. #2
    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 enviroment variables

    What does qmake -query return?
    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.


  3. #3
    Join Date
    Feb 2011
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake enviroment variables

    Someone is gonna help me

    QMAKE_MKSPECS:c:/qtnew\mkspecs
    QTDIR:c:\qtnew
    QT_INSTALL_BINS:c:/qtnew/bin
    QT_INSTALL_CONFIGURATION:c:/qtnew
    QT_INSTALL_DATA:c:/qtnew
    QT_INSTALL_DEMOS:c:/qtnew/demos
    QT_INSTALL_DOCS:c:/qtnew/doc
    QT_INSTALL_EXAMPLES:c:/qtnew/examples
    QT_INSTALL_HEADERS:c:/qtnew/include
    QT_INSTALL_IMPORTS:c:/qtnew/imports
    QT_INSTALL_LIBS:c:/qtnew/lib
    QT_INSTALL_PLUGINS:c:/qtnew/plugins
    QT_INSTALL_PREFIX:c:/qtnew
    QT_INSTALL_TRANSLATIONS:c:/qtnew/translations
    QT_INSTALL_PREFIX:c:\qt
    QT_INSTALL_DATA:c:/qt
    QT_INSTALL_DOCS:c:/qt/doc
    QT_INSTALL_HEADERS:c:/qt/include
    QT_INSTALL_LIBS:c:/qt/lib
    QT_INSTALL_BINS:c:/qt/bin
    QT_INSTALL_PLUGINS:c:/qt/plugins
    QT_INSTALL_IMPORTS:c:/qt/imports
    QT_INSTALL_TRANSLATIONS:c:/qt/translations
    QT_INSTALL_CONFIGURATION:c:/qt
    QT_INSTALL_EXAMPLES:c:/qt/examples
    QT_INSTALL_DEMOS:c:/qt/demos
    QMAKE_MKSPECS:c:/qt\mkspecs
    QMAKE_VERSION:2.01a
    QT_VERSION:4.7.1

  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 enviroment variables

    Nice garbage I have to disapoint you, this won't work. Set all those variables you modified to empty values, then run configure.exe after you have changed the directory name, then cd into qmake directory and run mingw32-make clean and mingw32-make. Afterwards your qmake should understand the new paths.
    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
    Feb 2011
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake enviroment variables

    Thanks for the answer ! I hope what you say to do is not gonna take another 6 hours of compilation
    I could do recompilation; That's why I am here to know how to fix it.

    what do you mean garbage !? I can see from your forum ID that you are a Qt developer

    can you please explain me how these local variables work and where they are stored? is my build corrupted? I, as a programmer think this could be a bug that for any reason the "qmake -query" shows that it has more than one value for a variable ! No ?

    why should qmake return such a list ?

    thanks in advance.

  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 enviroment variables

    Quote Originally Posted by qtarian View Post
    Thanks for the answer ! I hope what you say to do is not gonna take another 6 hours of compilation
    No, it should take up to 5 minutes. You only need to rebuild qmake, nothing more.

    what do you mean garbage !?
    I mean all those slashes and backslashes and doubled entries.

    I can see from your forum ID that you are a Qt developer
    No, I'm a "Nokia certified Qt developer". I'm not developing Qt, I'm developing with Qt.

    can you please explain me how these local variables work
    They are used during reading .pro files.

    and where they are stored?
    If you are using Windows then in the registry.

    is my build corrupted?
    No, not really.
    I, as a programmer think this could be a bug that for any reason the "qmake -query" shows that it has more than one value for a variable ! No ?
    No. Those variables are read-only, you can't change them. If you try to do that, new variables with the same names get created. I can agree this can be confusing.
    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.


  7. The following user says thank you to wysota for this useful post:

    qtarian (28th February 2011)

Similar Threads

  1. qmake: how to supply multiple variables via command-line?
    By eyeofhell in forum Qt Programming
    Replies: 1
    Last Post: 6th July 2014, 02:58
  2. Paths & enviroment settings
    By SteveH in forum Installation and Deployment
    Replies: 4
    Last Post: 23rd November 2010, 18:09
  3. Replies: 2
    Last Post: 25th June 2009, 19:47
  4. Order of qmake variables
    By babu198649 in forum Newbie
    Replies: 3
    Last Post: 29th June 2008, 09:02
  5. Replies: 3
    Last Post: 6th February 2008, 12:53

Tags for this Thread

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.