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,380
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, q2, q3. 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)