gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 17:13:15 29 4
gpt4 key购买 nike

我正在尝试在 centos 6,5 上安装 php-cpp。当我运行命令 make 时,出现错误:

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++ 是:

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.

非常感谢!

===更新====

修复了将 gcc 从 4.4 升级到 4.7

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

最佳答案

直到更高版本的 g++ (4.7) 才添加该标志以获得 gcc 4.4 compat(尽可能多)你需要使用 -std=c+ +0x 标志。

引用:https://gcc.gnu.org/projects/cxx0x.html

关于centos - cc1plus : error: unrecognized command line option "-std=c++11",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27341599/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com