How to set Qt version for qmake
-
I need to compile Qt project on school server using qmake.
There are several Qt versions available.
How can I set Qt version to be used by qmake?I have tried to set QT_VERSION flag in .pro file but without effect.
Thx
-
Did you check this documentation - Configure Qt Kits
-
But this explains how to set version in GUI.
I need to set this in termina.
Sorry I didn't noted, that this is headless server. -
which operating system and which qt version ? Are you able to login to the box on terminal ?
-
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.5.1804 (Core)
Release: 7.5.1804
Codename: CoreThere is more qt versions there.
Qt-4.7, Qt-4.7.4, Qt-4.8.6, Qt-5, Qt-5.2.1, Qt-5.5.1, Qt-5.9.2.What do you mean by "box"?
I am able to ssh to the server with normal acount (no admin). -
@zbysekvoda You can/(should?) use the qmake version from the version for which you want to compile. So if you want to use Qt-5.9.2 installed in /usr/local/Qt/Qt-5.9.2 for instance, you can the qmake in /usr/local/Qt/Qt-5.9.2/gcc/bin/qmake (or a path somewhat similar to that). That will set up all the rights paths for libraries etc.
-
Just to add to @Ilja: Each Qt version has it's own qmake. By calling a specific qmake version with full path, a Makefile is generated that compiles the code for exactly this Qt versions.
Just be sure to not mix multiple Qt versions in one folder! Best is to do out-of-source (or shadow) builds.
Regards
-
It helped. Thank you guys.