As your Ubuntu installation gets older, you might be missing out on newer C++ features in the GCC compilers. You might want to try to upgrade the GCC compilers to a more recent version.
This can be done by using the ubuntu-toolchain-r/test
PPA. For example, on my Ubuntu 14.04 system which had GCC 4.8, I installed GCC 4.9 with these steps:
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test $ sudo apt-get update $ sudo apt-get install gcc-4.9 g++-4.9
The default GCC will still remain your original version. The newer version will have to be invoked explicitly, for example as gcc-4.9
. If you wish to switch the default to the newer version, that is explained in this post.
Advertisements
great information, but should not the gcc also be upgraded just like normal update?
LikeLike
ArcherImagine: I’ve not seen Ubuntu updating the GCC version in their LTS over the years its supported. That is why I had to upgrade it myself to use some of the new C++11 features.
LikeLike
Thanks, this was a news to me
LikeLike