Install QT on hard drive ?
-
Using Linux / Ubuntu.
Can I install another copy of QT outside of the OS folders?
If so - how does Ubuntu select correct copy ? -
@AnneRanch said in Install QT on hard drive ?:
If so - how does Ubuntu select correct copy ?
Ubuntu does not select anything. You select it in your QtCreator kit settings.
-
@AnneRanch said in Install QT on hard drive ?:
If so - how does Ubuntu select correct copy ?
Ubuntu does not select anything. You select it in your QtCreator kit settings.
@Christian-Ehrlicher I was expecting a SINGLE executable...
I guess I know after I install my "hard drive" version how to actually identify what is being executed.
For example - I can "configure" project with "use all kits" so there is no such thing as ":single executable" - since I already have minimum of two "QT" folders. -
Qt is a c++ library, not a single executable. But you're aware of that already since you use Qt for years...
-
@AnneRanch said in Install QT on hard drive ?:
Can I install another copy of QT outside of the OS folders?
Yes. The Qt Installer will let you put versions(s) of Qt anywhere you like, or you can build Qt from source to put the result anywhere you want.
If so - how does Ubuntu select correct copy ?
At compile time:
Ubuntu doesn't, you do.
If you build manually with qmake then you select the Qt version by using the qmake binary bundled with that version.
If you build manually with CMake then you select the Qt version by setting CMAKE_PREFIX_PATH environment variable before running cmake.
If you use Qt Creator then your build kit defines which Qt copy is used to build the application. Qt Creator ensures the correct environment to build with the select Qt library.At run time:
The UNIX-like operating system will load the first Qt library matching the executable's requirements that it finds in the LD_LIBRARY_PATH or default system library locations. When you package your application along with the matching Qt dynamic libraries you typically use the LD_LIBRARY_PATH to make sure these are the first libraries found. -
@AnneRanch said in Install QT on hard drive ?:
Can I install another copy of QT outside of the OS folders?
Yes. The Qt Installer will let you put versions(s) of Qt anywhere you like, or you can build Qt from source to put the result anywhere you want.
If so - how does Ubuntu select correct copy ?
At compile time:
Ubuntu doesn't, you do.
If you build manually with qmake then you select the Qt version by using the qmake binary bundled with that version.
If you build manually with CMake then you select the Qt version by setting CMAKE_PREFIX_PATH environment variable before running cmake.
If you use Qt Creator then your build kit defines which Qt copy is used to build the application. Qt Creator ensures the correct environment to build with the select Qt library.At run time:
The UNIX-like operating system will load the first Qt library matching the executable's requirements that it finds in the LD_LIBRARY_PATH or default system library locations. When you package your application along with the matching Qt dynamic libraries you typically use the LD_LIBRARY_PATH to make sure these are the first libraries found.@ChrisW67 Thank you very much for spending your time for such great replay. It is much appreciated