NoSenseEtAl
NoSenseEtAl

Reputation: 30048

Getting the latest version of GCC and boost on newest version of Ubuntu

First of all I know that the title is general, but i presume that is the correct way of asking questions. Specifics are: I'm trying to get boost 1.46 and gcc 4.6 using ppa(ubuntu toolchain for gcc and boost latest for libboost). I can do it on 10.10, but it seems impossible on 11.04. So is there an official way of using the latest version of gcc and libbbost. I know that default versions for ubuntu arent the newest ones, but i need some 1.44+ boost stuff and gcc 4.6 for some nice :) c++11 features. So what is the best way to do it? PPA?

Upvotes: 1

Views: 737

Answers (1)

Gunther Piez
Gunther Piez

Reputation: 30439

This works on every distribution on almost any operating system:

Go to gcc.gnu.org, download the sources, unpack, have a look at the README, do a

./configure
make -j4
make install (as root)

which will install gcc in the /usr/local prefix (your current compiler will be untouched). If you want to use the compiler, you need to make your toolchain aware of it, you can use some environment variables (CC, PATH) or configure your project manually.

Repeat for boost.

Upvotes: 3

Related Questions