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.

OS is Ubuntu 10.04.
I need to compile some C++ code with -std=c++0x flag. But compiling doesn't work because I need 4.6.1 version.
Now, when I go to Gnu's ftp, I see two different packages:

gcc-4.6.1   
gcc-g++-4.6.1  

Knowing that I need to compile C++0x code, which one should I download, and how do I install it/them?
I already installed these libraries (gmp, mpc and mpfr).

share|improve this question
    
Don't install gcc, instead, install g++ –  Lilian A. Moraru Mar 3 '12 at 10:11

2 Answers 2

Find yourself a PPA that suits your needs, and install a GCC package from there. There are install instruction within each PPA's page.

Obviously, PPAs contain unofficial packages, so YMMV.

share|improve this answer

I think this PPA has gcc 4.6.1 : Toolchain test builds. But the installation process probably will replace other packages. Probably would be safer downloading the source and compiling it yourself.

You can also upgrade to 11.10 or install it in a VM (currently it has gcc/g++ 4.6.1).

share|improve this answer

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.