如何在cent os上指定c ++ 0x标志 [英] How to specify c++0x flag on cent os

查看:132
本文介绍了如何在cent os上指定c ++ 0x标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命令 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆