After Qt installation, an application cannot find Qt, and qmake also not working
-
wrote on 16 Dec 2016, 23:42 last edited by
Hello,
I installed Qt5.6.1 on Ubuntu 16.04 LTS and the development environment starts but that's not what I need.With the installer, it was installed in my home directory under /Qt5.6.1
1:
I have a program compiled on another Ubuntu 14.04 LTS system which is not working on the new installation.
The error is:
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5: versionQt_5' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version
Qt_5' not found (required by ./xflr5)
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: versionQt_5.6' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version
Qt_5' not found (required by ./xflr5)
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by ./xflr5)2:
I also tried to compile a new version on the new system using qmake, that's also not working.I assume there need to be some PATH setting in .bashrc and .profile which were required on the old system but this didn't help:
.bashrc
PATH=/home/klaus/Qt5.6.1/5.6/gcc_64/bin.profile
PATH=/home/klaus/Qt5.6.1/5.6/gcc_64/bin:$PATH
export PATHWhat settings are requires to compile a program using qmake?
Klaus
-
Hello,
I installed Qt5.6.1 on Ubuntu 16.04 LTS and the development environment starts but that's not what I need.With the installer, it was installed in my home directory under /Qt5.6.1
1:
I have a program compiled on another Ubuntu 14.04 LTS system which is not working on the new installation.
The error is:
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5: versionQt_5' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version
Qt_5' not found (required by ./xflr5)
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: versionQt_5.6' not found (required by ./xflr5) ./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version
Qt_5' not found (required by ./xflr5)
./xflr5: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by ./xflr5)2:
I also tried to compile a new version on the new system using qmake, that's also not working.I assume there need to be some PATH setting in .bashrc and .profile which were required on the old system but this didn't help:
.bashrc
PATH=/home/klaus/Qt5.6.1/5.6/gcc_64/bin.profile
PATH=/home/klaus/Qt5.6.1/5.6/gcc_64/bin:$PATH
export PATHWhat settings are requires to compile a program using qmake?
Klaus
wrote on 17 Dec 2016, 02:02 last edited by@klausb I do this in my .bashrc:
PATH="/usr/local/Qt/bin:$PATH" QTDIR="/usr/local/Qt" export PATH QTDIR
That should get you what you need to use your Qt. Make sure you adjust to your paths. Your QTDIR will be all the way to the directory that has
bin
,lib
, etc.If all else fails you can start your apps with an
LD_LIBRARY_PATH
which will cause them to use your specific Qt version instead of the system one.I.e.
LD_LIBRARY_PATH="/your/path/to/Qt/lib" ./yourapp
-
HI and welcome to devnet,
If you'd like to build/run your application on the command line, you should rather use the full path to the version of qmake you want to use. That way you know precisely which one you'll be calling.
Modifying the PATH environment like that has a side effect: if you are using also your distribution's dev package for development it won't be the default anymore.
-
HI and welcome to devnet,
If you'd like to build/run your application on the command line, you should rather use the full path to the version of qmake you want to use. That way you know precisely which one you'll be calling.
Modifying the PATH environment like that has a side effect: if you are using also your distribution's dev package for development it won't be the default anymore.
wrote on 18 Dec 2016, 01:27 last edited by@SGaist That is true. I usually prefer just my custom built Qt to develop with though. I rarely use the one that is installed with Linux.
On occasion I have a project that needs an older Qt, in which case I tend to use aliases to switch. I tend to have things like
alias set-qt54="..."
which I can call to change my QTDIR and PATH to the Qt I want. I would find it much more annoying to constantly have to do something like/usr/local/Qt/bin/qmake
every time I wanted to run it. Although I use almost exclusively cmake now so it probably wouldn't bother me anymore. :)
1/4