Choosing the right version of QT
You should run qmake
with its full path:
$ ~/lib/Qt5.9.1/5.9.1/gcc_64/bin/qmake
If you don't want to type full path, you could prepend your local Qt directory to PATH
environment variable. In order for runtime linker to find right libraries, you can add Qt directory to LD_LIBRARY_PATH
. You could set QTDIR
too, so tools like CMake find right Qt:
You could put following line in ~/.bashrc
:
export QTDIR="~/lib/Qt5.9.1/5.9.1/gcc_64/"export PATH="$QTDIR/bin:$PATH"export LD_LIBRARY_PATH="$QTDIR/lib:$LD_LIBRARY_PATH"