Home GCC version is 4.8 still getting the error of unrecognized command -std=c++11 in centos
Reply: 1

GCC version is 4.8 still getting the error of unrecognized command -std=c++11 in centos

Nikhil Kumawat
Nikhil Kumawat Published in 2018-02-14 07:26:32Z

I am installing deepdetect. while compiling it is giving the error of

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

I have gcc version 4.8. Output of "gcc --version":

[root@datanode2 lib]# gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)

I have installed below package by yum:

devtoolset-2-gcc.x86_64 4.8.2-15.1.el6 @slc6-devtoolset

Output of "yum info gcc":

Installed Packages
Name : gcc
Arch : x86_64
Version : 4.4.7
Release : 18.el6
Size : 19 M
Repo : installed
From repo : base
Summary : Various compilers (C, C++, Objective-C, Java, ...)
URL : http://gcc.gnu.org
License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
Description : The gcc package contains the GNU Compiler Collection version 
: You'll need this package in order to compile C code.

Can anyone help me why I am getting this error. Default gcc package was gcc 4.4.7. After that I installed gcc 4.8.2 then also I am getting this error..

Any help would be appreciated.

Florian Weimer
Florian Weimer Reply to 2018-02-14 10:57:57Z

The RPM package with the C++ compiler is actually called devtoolset-2-gcc-c++. It suspect the failed comment uses g++, not gcc, so it picks up the system compiler.

(By the way, you should really use a more recent version of DTS. C++11 support in GCC 4.8 is still experimental.)

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.329771 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO