0

I am aware that there are several related posts on this forum, but I'm still puzzled by this problem. I am using Redhat Linux. The gcc and g++ versions are -

gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)

Despite having the 4.8 version of gcc and g++, I receive the same error -

cc1plus: error: unrecognized command line option "-std=c++11"    

Is there some kind of additional configuration that is needed, apart from simply installing gcc/g++ 4.8 version?

V-Red
  • 239
  • 2
  • 17
  • Can you post the full `cc1plus` invocation when you run the C++ compiler with the `-v` option? Thanks. – Florian Weimer Aug 01 '17 at 20:28
  • 1
    You need g++-4.9 or newer to get `-std=c++11`. With g++-4.8 you only `c++0x`. – Dirk Eddelbuettel Aug 01 '17 at 20:33
  • Possible duplicate of [cc1plus: error: unrecognized command line option "-std=c++11" with g++](https://stackoverflow.com/questions/14674597/cc1plus-error-unrecognized-command-line-option-std-c11-with-g) – knst Aug 02 '17 at 13:16
  • 1
    @knst The solution mentioned in that post is that having a gcc version of 4.3 or higher would allow for c++11. But that doesn't seem to work in this situation. – V-Red Aug 02 '17 at 17:57

0 Answers0