Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is the output from my portage search for gcc:

emerge -s gcc

*  sys-devel/gcc
      Latest version available: 4.6.3
      Latest version installed: 4.6.3
      Size of files: 70,353 kB
      Description:   The GNU Compiler Collection
      License:       GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+

Yet when I do gcc --version, I get this:

gcc (Gentoo 4.5.4 p1.0, pie-0.4.7) 4.5.4

Any ideas? I need to use C++11 for a project I'm trying to compile, but I have no idea what to do. Thank you in advance!!

share|improve this question

You have to use gcc-config. It's basically an eselect version for gcc. Follow the gentoo gcc upgrade guide here:

share|improve this answer

emerg based on Python and reads standard .ebuild files located in /usr/portage. The ebuild files describes how the source should be configured and installed, depending on variables set in /etc/make.conf.

Maybe in new version of GCC .ebuild file doesn't upgrade. and You see wrong version.

GCC 4.5 Which you have it doesn't support below options:

  1. Rvalue references for *this
  2. Non-static data member initializers
  3. Template aliases
  4. Null pointer constant
  5. Forward declarations for enums
  6. Generalized attributes
  7. Generalized constant expressions
  8. Alignment support
  9. Delegating constructors
  10. Inheriting constructors
  11. Extended friend declarations and many other options...

GCC 4.8 support C++11 fully. Try to upgrade your compiler to latest version.

share|improve this answer
Do you know how to change ebuilds so that it will upgrade? Thanks for the help, I'm going to try to locate the new gcc version that's been compiled. – Athan Clark Apr 22 '13 at 17:42
For upgrading your GCC, it's too easy use apt-get update; apt-get upgrade in debian base or yum update command in redhat base linux. These command updates all old packages. – Sepahrad Salour Apr 22 '13 at 18:24
I'm using gentoo haha. Hence the emerge/portage stuff haha. – Athan Clark Apr 22 '13 at 19:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .