2

I have a C++ Qt program. It compiles using qmake && make.

It always ends up compiling using Qt 5.2.1. I want to use Qt 5.5 that I downloaded.

$ qtchooser -l
4
5
default
qt4-i386-linux-gnu
qt4-x86_64-linux-gnu
qt4
qt5-x86_64-linux-gnu
qt5

None of those were new after I downloaded and installed Qt 5.5.

I used the Qt Creator program to 'remove' the old version of Qt such that 5.5 is the only one there now, but still it's stuck on 5.2.1 when I compile.

I want to know the official way to do this as I need to write instructions for others to compile my program.

I'm using the opensource versions of Qt.

gsxruk
  • 1,370
  • 1
  • 9
  • 12
Green Mo
  • 43
  • 1
  • 1
  • 4
  • I've now got it by linking explicitly to the qmake binary in the Qt5.5 directory, but ideally I'd like to know the "proper" command-line way to do this. – Green Mo Feb 10 '17 at 16:13
  • Clarification: This is what I'm doing as a workaround: $ ~/Qt5.5.0/5.5/gcc_64/bin/qmake && make – Green Mo Feb 10 '17 at 16:19
  • Qt Creator itself will use an absolute path to the required Qt version. There is nothing wrong or "unofficial" about that. – gsxruk Feb 10 '17 at 18:31
  • No @Anwar It's not a duplicate question. Maybe the resolution is similar, but the question is different. One is asking about how to make sure that a version of QT is installed properly. The other is asking how to switch between different versions of installed QT. – Green Mo Jun 11 '17 at 14:07
  • @GreenMo I don't get any point in closing questions. And please don't jump into conclusion to early. Have a nice day! – Anwar Jun 11 '17 at 14:11
  • @Anwar, I see, sorry for my rudeness then. You have a nice day too :8) – Green Mo Jun 11 '17 at 14:13
  • I admit my target question wasn't too precise. We actually have lots of similar question. Maybe you want to make one of these as a target question. [q1](https://askubuntu.com/questions/326378/qt5-with-qt-4-7-on-ubuntu-13-04-how-to-install-it-both-without-conflicts), [q2](https://askubuntu.com/questions/820054/selecting-qt5-using-qtchooser), [q3](https://askubuntu.com/questions/424161/how-to-install-both-qt5-qmake-and-qt4-qmake). They have good answers there imo – Anwar Jun 11 '17 at 14:22

1 Answers1

0

The answer is posted here , you can use the first answer and then edit default.conf in /usr/lib/x86_64-linux-gnu/qtchooser like I did here:

#/usr/lib/x86_64-linux-gnu/qt5/bin
#/usr/lib/x86_64-linux-gnu
/usr/lib/debug/opt/qt54/bin
/usr/lib/debug/opt/qt54/lib

or you can go with the second answer. (up to you)

B.andalous
  • 25
  • 1
  • 4
  • Posted where? There was absolutely noting in that answer about `default.conf`~ – Anwar Jun 14 '17 at 16:59
  • I post that question and if you read the comments there you will understand. – B.andalous Jun 15 '17 at 13:39
  • see [this](https://askubuntu.com/questions/435564/qt5-installation-and-path-configuration) – B.andalous Jun 15 '17 at 14:02
  • You posted the question there, so what? It's not the one that contains the source of this answer. And if the things are same, you should flag as duplicate. – Anwar Jun 15 '17 at 14:25
  • it is flaged as a duplicate and when i wrote for you what i did i didn't see the answer, I have just figured that out – B.andalous Jun 16 '17 at 08:07