Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have ubuntu 10.10, and I have been learning c++ lately on it. I originally installed the gcc compilier via the command:

sudo aptitude install build-essential

I would like to start learning/testing the newer c++ features and I think it would be best to have the latest version of gcc installed. Im just needing some advice on this.

Is it possible to put a newer version of gcc in a separate folder that I can use for testing?

or

Is it possible/should I upgrade the current running version of gcc compilier

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

Yes you can download a newer version of gcc as a tarball and compile it with the current kernel installed. You can find gcc (and binutils) here:

GNU

Is it possible/should I upgrade the current running version of gcc compilier

No you should not and cannot simply upgrade the compiler via the package management system. Further this could lead to dependency problems.

share|improve this answer
add comment

It is possible, at least on Debian squeeze, and probably therefore on Ubuntu, which tends to be more recent than Debian, to backport Debian gcc packages.

See my answer on ask.debian.net to my own question, namely http://ask.debian.net/questions/backporting-more-recent-versions-of-the-gcc-toolchain-to-debian-stable.

More details available on request.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.