构建Qt项目C ++ 11标准 [英] Building Qt project for C++11 standard

查看:125
本文介绍了构建Qt项目C ++ 11标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立我的Qt项目,C ++ 11的标准。我在构建步骤,附加参数选项添加这个标志,在Qt Creator的:

I am trying to build my Qt project with C++11 standard. I added this flag in the build steps, additional argument option, in the Qt Creator :

-std=c++11

但我得到这个错误,而建设:

But I got this error while building :

Unknown option -std=c++11

g ++的版本信息: G ++(Ubuntu的/ Linaro的4.6.3-1ubuntu5)4.6.3

任何想法?

推荐答案

使用该Qmake工程文件中,加入这一行: QMAKE_CXXFLAGS + = -std = C ++ 11

Use the qmake project file, add this line: QMAKE_CXXFLAGS += -std=c++11

LE:4.6.3也可能不支持C ++ 11(据我所知4.7及更高版本支持-std = C ++ 11),因此对于实施0X功能的选项可能是: QMAKE_CXXFLAGS + = -std =的C ++ 0x

LE: also 4.6.3 might not support C++11 (as far as i know 4.7 and higher support -std=c++11) so the option for the 0x features implemented might be: QMAKE_CXXFLAGS += -std=c++0x

这篇关于构建Qt项目C ++ 11标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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