2014-12-07 10 views
5

sto provando installare php-cpp su centos 6,5. quando ho eseguito il comando make, sto ottenendo errore:cc1plus: errore: opzione della riga di comando non riconosciuta "-std = C++ 11"

make: Warning: File `Makefile' has modification time 5.1e+05 s in the future 
mkdir -p shared/common 
mkdir -p shared/zend 
mkdir -p shared/hhvm 
g++ -Wall -c -g -std=c++11 -fpic -o shared/common/modifiers.o common/modifiers.cpp 
cc1plus: error: unrecognized command line option "-std=c++11" 
make: *** [shared/common/modifiers.o] Error 1 

cosa devo fare per risolvere questo problema? mia g ++ è:

g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) 
Copyright (C) 2010 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

grazie mille!

=== ==== UPDATE

fisso con upgrade gcc 4.4 a 4,7

http://ask.xmodulo.com/upgrade-gcc-centos.html

+0

https://stackoverflow.com/questions/14674597/cc1plus-error-unrecognized-command-line-option-std-c11-with-g – otiai10

risposta

8

Quella bandiera non è stato aggiunto fino ad una versione successiva di g++ (4.7) per ottenere il gcc 4.4 compat (tanto quanto c'era) è necessario utilizzare il flag -std=c++0x.

Rif: https://gcc.gnu.org/projects/cxx0x.html

+0

Grazie mille. Ho aggiornato g ++ a 4.7 con il flusso http://ask.xmodulo.com/upgrade-gcc-centos.html –