Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I use Red Hat Enterprise in my school and I want to compile some c++11 code but the gcc --version is 4.4.7 which is not compatible. Is that one the latest version in the red hat repositories? is there any compiler that can be installed quickly using yum and that supports c++11?

share|improve this question
1  
c++11 was standardized after the release of RHEL 6. –  jordanm Feb 6 at 20:04
    
so there won't be any c++11 in RHEL 6? –  German Feb 6 at 20:07
1  
It is probably possible to backport a package of gcc 4.7 to your system, but would require some effort. A local installation of gcc 4.7 is also possible, and would be easier. –  Faheem Mitha Feb 6 at 20:27
    
Do you have administrator access on the system? –  Mikel Feb 6 at 21:47
    
With RHEL7 Beta coming out I would highly doubt it! Backporting yourself will likely be your only option. –  slm Feb 6 at 22:09

2 Answers 2

The latest version of Clang seems to support c++11.

You can get Clang 3.0 from ELrepo or Clang 3.4 from the Clang/LLVM homepage.

share|improve this answer
1  
isn't it the same difficulty than trying to install some newer version of gcc? –  German Feb 7 at 19:57

Supported way how to have more recent gcc is a special software collection with development tools called Developer Toolset. It contains GCC 4.8.1, which implements C++11 standard.

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.