如何在cent os上指定c ++ 0x标志 [英] How to specify c++0x flag on cent os
问题描述
命令 g ++ -o myprogram myprogram.c -std = c ++ 0x
在ubuntu上运行良好,但是当我尝试同样centos它抛出一个错误 cc1plus:error:unrecognized命令行选项-std = c ++ 0x
。甚至谷歌没有给出答案。有没有人经历过吗?有没有人知道解决方案?
The command g++ -o myprogram myprogram.c -std=c++0x
works well on ubuntu but when I try the same with centos it throws me an error cc1plus: error: unrecognized command line option "-std=c++0x"
. Even google doesn't give the answer. Have anybody experienced it before? Does anybody know the solution?
推荐答案
你最有可能在每个系统上有不同版本的编译器,运行 g ++ --version
查看每个版本运行的版本( -std = c ++ 0x
g ++)。
You most likely have different versions of the compiler on each system, run g++ --version
to see which version you're running on each (-std=c++0x
is only supported from version 4.4 of g++).
这篇关于如何在cent os上指定c ++ 0x标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!