首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >cc1plus:错误:无法识别的命令行选项"-std=c++11“

cc1plus:错误:无法识别的命令行选项"-std=c++11“
EN

Stack Overflow用户
提问于 2014-12-07 18:13:15
回答 1查看 27.5K关注 0票数 6

我正在尝试在centos 6.5上安装php-cpp。当我运行make命令时,我得到错误:

代码语言:javascript
复制
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

我应该怎么做才能解决这个问题?我的g++是:

代码语言:javascript
复制
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.

非常感谢!

===更新====

修复了从4.4升级到4.7的问题

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-12-07 21:04:15

该标志直到g++的更高版本(4.7)才添加。要获得gcc 4.4版本的兼容性(与已有的版本一样多),您需要使用-std=c++0x标志。

参考:https://gcc.gnu.org/projects/cxx0x.html

票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27341599

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档