[Solved] Installing Qt stable from source in Linux with another version on the system



  • I want to try out building and using a build from source without deleting the current version of Qt/qmake that I installed via apt/Synaptic.

    I have built it and ran make/make install and it is located in /usr/local/Trolltech/Qt-4.8.5/...

    Now, if I type:
    $ qmake --version

    I get the old version, not the new one.

    I have added the /usr/local/Trolltech/Qt-4.8.5/bin/ folder to the path.

    I have a couple of questions:

    1. How do I differentiate between the two versions of qmake? Via the -spec flag?
    2. How do I keep from really screwing up my KDE apps while testing out a version of Qt that's newer than what they were built with?

    Thanks!



  • I added a bash script to the /usr/local/bin, which is also in my $PATH environment variable.

    Here's the script:

    @
    $ vim /usr/local/bin/qmake-qt485
    #!/bin/bash
    export QMAKEROOT=/usr/local/Trolltech/Qt-4.8.5
    QMAKEROOT/bin/qmake $@@

    To use it from wherever I have a Qt .pro file configured (and my source code):

    @
    $ qmake-qt485
    $ make
    @

    This might not be the best or intended way, but it was the simplest.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.