2

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).

  • Don't install gcc, instead, install g++ – Lilian A. Moraru Mar 3 '12 at 10:11
1

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.

|improve this answer|||||
0

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).

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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