Question

I am running CodeLite 5.2 on Ubuntu 12.04 LTS (downgraded from 13.04, which has some stability problems right now).

I just installed the GCC 4.8 compiler, which is not the default GCC compiler on 12.04. I need this compiler to get all the C++ 11 features it supports and were there by default with the compiler that comes with 13.04, using the ‘-std=c++11' switch.

So now I have 4.8 compiler installed, but I can't figure out how to tell CodeLite to use that compiler instead of the default GCC compiler that comes with 12.04 (4.4.x?). How do I do this?

Was it helpful?

Solution 2

From our Linux guru in the office:

These commands should be run as the superuser (sudo):

apt-get install g++-4.8.1

update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 100

update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8.1 50

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 100

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8.1 50

update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 100

update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.8.1 50

update-alternatives --set g++ /usr/bin/g++-4.8.1

update-alternatives --set gcc /usr/bin/gcc-4.8.1

update-alternatives --set cpp-bin /usr/bin/cpp-4.8.1

OTHER TIPS

I just discovered the existence of CodeLite by reading your question.

I found very quickly the instructions to use clang in CodeLite

Just follow them, substituting gcc-4.8 (or your full path to your gcc 4.8) for clang and g++-4.8 for clang++

BTW, I hope you did compile GCC 4.8.1 with the --program-suffix=-4.8 option to its ..../configure script.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top