QMake -v pointing to the wrong directory
-
Hello,
I am following the tutorial of how to build qt creator from git on my linux vmware machine.
http://wiki.qt.io/Building-Qt-Creator-from-Git
I come to the first step: qmake -v
My output of qmake -v is different..- root@ubuntu:/home/jorricks/qt5/qtbase/bin# qmake -v
QMake version 3.0
Using Qt version 5.3.0 in /usr/lib/i386-linux-gnu
root@ubuntu:/home/jorricks/qt5/qtbase/bin# ./qmake -v
QMake version 3.0
Using Qt version 5.4.2 in /home/jorricks/qt5/qtbase/lib
Of course I want to use the 5.4.2...
My $PATH- root@ubuntu:/home/jorricks/qt5/qtbase/bin# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/jorricks/qt5/qtbase/bin
Does anyone have any suggestions for me?
Kind regards,
- root@ubuntu:/home/jorricks/qt5/qtbase/bin# qmake -v
-
@jorricks Hi, I think you are running Qt 5.3.0 as your system Qt and as it seems you built 5.4.2 and installed it in your home directory. But your PATH references your system Qt first. Try putting
/home/jorricks/qt5/qtbase/bin
first in your PATH:export PATH=$HOME/qt5/qtbase/bin:$PATH
-
Hi,
If you want to call the qmake from your current path (/home/jorricks/qt5/qtbase/bin) you need to add ./ before so:
root@ubuntu:/home/jorricks/qt5/qtbase/bin# ./qmake -v
will show you the correct version.I'd avoid modifying PATH since you could end up having more version of Qt on your system. You should rather use the full path to qmake, so you know you are using the one you want to currently use.
On a side note, developing as root is pretty dangerous, you can annihilate your system without knowing and you won't get any warning.
-
I'd avoid modifying PATH since you could end up having more version of Qt on your system. You should rather use the full path to qmake, so you know you are using the one you want to currently use.
Admittedly one should know what she/he is doing. But that said
qtchooser
comes to my mind (http://code.qt.io/cgit/qt/qtchooser.git/). It uses the version one can set via theQT_SELECT
environment variable.
Should be a standard package that comes with the distro. -
@jorricks You are welcome.
-
@SGaist Okay.. so It didn't really work out after all..
I was trying to install qt-creator for 5.4.2.
I edited the path and everywhere qmake -v now points to the right directory..
However, after installing I looked at help and still qt creator was using qt 5.3...
How do I make sure my installation is done for 5.4.2??- root@ubuntu:/home/jorricks/qt-creator-build# /home/jorricks/qt5/qtbase/lib/qmake -r /home/jorricks/qt-creator/qtcreator.pro
bash: /home/jorricks/qt5/qtbase/lib/qmake: No such file or directory
That was the outcome of the full path as suggested..
Kind regards,
- root@ubuntu:/home/jorricks/qt-creator-build# /home/jorricks/qt5/qtbase/lib/qmake -r /home/jorricks/qt-creator/qtcreator.pro
-
The Qt version used to build Qt Creator and the one you are using are two completely different things and don't need to match.
So are you building Qt Creator ?
Also, are you doing it as root or as your normal user ? It's not really clear.
-
@SGaist Okay.. So I found out I installed QT5 with apt-get as well..
Now I started it from the installed folder and it works.
I was indeed building qt creator yes and I was doing everything as root..
Everything works now except one thing..
The examples in qt creator don't show up and the same for the help..
I get this error:- The page could not be found
Error loading: qthelp://org.qt-project.qtcreator.3481/doc/index.html
Check that you have the corresponding documentation set installed.
Kind regards,
- The page could not be found
-
Is it an error from a self built Qt ?