C++

From Blue-IT.org Wiki

Switch different C- and C++ toolchains in parallel

I have to mention: I don't like working with C++. I know very well, it is one "mother" of all object oriented programming languages (despite there are others, like LISP). C and C++ take a major rule in embedded software development. And it has it's place in a lot of big and serious software projects, kernel development, ... but: I think it will be overcome with time due to a lot of facts I won't explain here - especially when it comes developing user applications. The arguments I wrote down in my bachelor thesis many years ago ...

If you have to deal with C++ in Ubuntu there are some caveats. One of them is to use different C/C++-Compiler versions in parallel within one Ubuntu distribution.

See:

A solution is pointed out here:

This boils down to (thanks muru)

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update

sudo apt-get install gcc-4.9 g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9

sudo apt-get install gcc-4.8 g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8

sudo update-alternatives --config gcc

Further reading embedded linux

eLinux Wiki: