0

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?

Vector
  • 10,879
  • 12
  • 61
  • 101

2 Answers2

1

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.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
  • Will check out. IMO codelite is the best open source C++ IDE out there right now. Does a lot of things that Code::Blocks does not, particularly refactoring options and class generation wizards, etc. Also behaves better with Qt. Will check out your links. (I am very lazy about finding things...) I did not have to compile GCC 4.8 - check this out. http://askubuntu.com/questions/271388/how-to-install-gcc-4-8-in-ubuntu-12-04-from-the-terminal. Link is 4 months old - I substituted 4.8 for 4.7 in aptitude and it worked. – Vector Jul 28 '13 at 10:14
1

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
sm925
  • 2,648
  • 1
  • 16
  • 28
Vector
  • 10,879
  • 12
  • 61
  • 101