how to install qt specific version libraries - c++

I need to install qt libraries 5.9 in Ubuntu 20.04.
sudo apt install qt5-default
will bring the latest qt release which I don't want.
I need specific qt libraries for compatibility reasons. I have applications running in the field where qt libraries are pre installed as dinamic libraries in the targets and can must be kept unchanged.

Ubuntu only offers the versions available in their repos.
If you want a specific version you can download the Qt installer (https://www.qt.io/download) and search for the version you need there. You'll find a list of builds available for download.
However, not all versions are available in their repos as well. In that case you'll have to build the version you need yourself I guess.

Related

Do I need to install Mingw compiler components in Qt installation if i had already installed Mingw in my computer?

I installing Qt open source framework in my window 10 pc. I already downloaded Mingw compiler and installed it to write C/C++. Now I wanna learn QT framework. I using Qt online installer. I choice to download custom compoment. Do I need to selet mingw component to download if i had already installed?
Note that there's not just one MinGW distribution and version out there. You can check out the exact supported version per Qt release at https://wiki.qt.io/MinGW .
Anyhow, if you install the pre-built Qt binaries via the online installer, the matching MinGW version will automatically be installed for you, and will be registered in Qt Creator so that things just work. There is actually no official way to prevent this.

How do I deal with qtbase-abi-5-2-1 dependency on Ubuntu?

I build my c++ Qt app on Mint 17.2, using debuild. The $shlibs variable expands to include qtbase-abi-5-2-1. Does that mean one of the dependent shared libraries is using Qt private headers? I'm not using private headers explicitly in my app.
In my .pro I have:
QT += printsupport
QT += widgets svg xmlpatterns network concurrent
Could one of those be causing this dependency?
The problem is my .deb won't install on Ubuntu 15.10 because it can't handle this dependency, since Ubuntu 15.10 comes with a later version of Qt.
Linking Qt statically is not an option for me. So what options do I have? Is there some way I can include libqt5core5a in my deb, and Ubuntu 15.10 will be happy? Or if I use a later version of Qt 5 to build, will the dependency on qtbase-abi-x-x-x go away (for instance, build on Ubuntu 15.10 which uses Qt 5.4.1 I believe, and future releases of Ubuntu won't complain about qtbase-abi-5-4-1)?
EDIT:
I tried building on Ubuntu 15.10, and I have the same problem: the executable is dependent on qtbase-abi-5-4-2.
In case it's helpful, I set up my build machine with this:
sudo apt-get install g++ subversion build-essential devscripts
debhelper libicu-dev qtbase5-dev qt5-default libqt5svg5-dev
libqt5xmlpatterns5-dev qttools5-dev-tools

How do i Upgrade from Qt5 to Qt5.4 on Linux?

My OS is Kubuntu 14.04.
I installed Qt5 via apt-get install libqt5-dev
How can i upgrade my Qt to the new Version of Qt(5.4)? I could install it manually but then the files in usr/include etc. are not updated and CMake is always searching there first, therefore not the newest Version will be picked. Is there a way to do something like make install to upgrade the existing Qt Version that will be used as default?

Does Linux command libboost-all-dev install and compile the header-only libraries?

On Ubuntu there is a command to install boost libraries which is something like this:
sudo apt-get install libboost-all-dev
does this command also install and compile the header-only libraries?
If not, what other terminal command would I need to execute so that I can install the FULL set of boost libraries?
My ultimate aim is to know which linux terminal commands I need to install (and have available) to obtain all of the boost libraries.
As is implied by "header only", one does not need to compile the header-only libraries. They're just headers.
Now, the libbost-all-dev package does install those libraries which need compilation (in addition to the header-only libs), but it does not compile them on the spot. Ubuntu is a so-called binary distribution, which means that it distributes packages in compiled form. Apt downloads the binaries and installs them immediately. This is in contrast to e.g. Gentoo which is a source distribution (and compiles everything on your machine).
In short, no further commands are necessary. Installing libbost-all-dev will install all available Boost libraries on Ubuntu.
Your questions, as posed, makes no sense.
The Debian / Ubuntu package libboost-all-dev has dependencies, and those dependencies do include the few binary library packages (eg Boost Thread, the formatting parts of Boost DateTime, etc pp). All those will get installed.
And yes, the intent of this meta package is to install the rest of the Boost development environment.
But it does not compile anything. All Debian / Ubuntu packages are pre-generated and built-offline and "just installed" at your end.
You can inspect the content of a package by browsing the online database.
But if you are only interested in header-only libraries I suggest to download the latest version of the boost libraries right from the official website; you should also learn how to build boost from the source because it's a know-how that you are very likely to use in a near future if you are relying on that library.
An equivalent step to browsing the online database, it's about using the following command
apt-cache show <package>
so, in your case
apt-cache show libboost-all-dev
and this will give you a very specific idea about what you are about to install.

Compiling a shared library with Qt on Ubuntu 9.10

I am new to both Qt and Linux C++ development (although I have many years C and C++ development experience on Windows).
I have some legacy C projects (source files and headers - [not using Qt]) that I want to compile into shared libs on Linux.
I am proposing to store my projects under the following structure:
/home/username/Projects/project_name
/home/username/Projects/project_name/src
/home/username/Projects/project_name/build
Can anyone tell me how to do the following (using Qt to simplify the build process)
Create different build configurations (debug, release etc)
Build a configuration to create the appropriate shared library
As an aside, I have only recently installed Ubuntu 9.10 and the only C/C++ development tool I have installed (using SPM) in Qt - so I dont know if I need to install some other GNU C++ tools.
BTW I have already checked and have gcc (v4.4.1) available on my machine. I do not appear to have g++ though - I do not know whether this is significant or not.
An Ubuntu system doesn't come with build tool chain by default. Instead it has a meta package that you will need to install:
sudo apt-get install build-essential
This will install, among other the g++ compiler, although I am not sure about the Qt headers an such. For them you will need the qt4-dev package (I assume you wish to work with qt4 rather then qt3).
As for the bould structure, you will want to consult the qmake manual, or you might want to consider using CMake (apt-get install cmake) instead. CMake allow for out of build sources, as you require, and personally, I can't recommend it enough.