Different version on the same machine
-
In a Debian environment I had to install different versions of Qt due to some incompatibility of third-part libraries. I need to write a script which should launch two executable compiled with the two different versions of Qt.
It's enough to export the bin directory to the PATH variable just before launch them or I have to take care of anything else?
-
Hello, I have also two versions of Qt on my debian (namely Qt 5.0.2 and Qt 5.1.1).
When I build my application using qmake from Qt 5.0.2 directory, then application uses Qt 5.0.2 library. If I build it using qmake from Qt 5.1.1, then it uses Qt 5.1.1.
You can try using LD_LIBRARY_PATH env variable and setting it to a different Qt versions before launching your app. To see what version of Qt application uses you can use:
@
qDebug() << qVersion();
@ -
I think you can skip writing your script and use Thiago's "qtchooser":https://qt.gitorious.org/qt/qtchooser for this.
In general, setting LD_LIBRARY_PATH is essential, while PATH and QTDIR is a nice bonus. The only problematic part can be plugins, which can include a different version of Qt and cause clashes (that is a problem on KDE, usually).
-
Thank you both. I'm looking through the Thiago's qtchooser.