7

I plan to download and install Ubuntu 13.04 and I would like to have two compilers on my system.

First question: what is the version of gcc/g++/gfortran shipped with ubuntu 13.04 ? (is it 4.7.3 ?).

So, I would like to have gcc/g++/gfortran 4.8 as my default compiler (and 4.7.3 as a "backup"). Is there a well precompiled version avaible somewhere (compiled with the right optimizations and enabling std::thread) ? And how to download on install it ?

Vincent
  • 243

2 Answers2

6

Yes, Raring has gcc 4.7.3 by default. However you can install gcc 4.8 from Ubuntu toolchain PPA.

You can even install latest gcc snapshot by installing gcc-snapshot package available in universe repository. (not recommended though)

gkcn
  • 176
  • 1
  • 1
  • 3
3

The following should do the trick:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8

Note, if you receive an error saying that add-apt-repository does not exist, you can install it via:

sudo apt-get install software-properties-common
Drew Noakes
  • 5,708