用Eclipse构建c ++ 0x功能 [英] Build c++0x features with Eclipse

查看:171
本文介绍了用Eclipse构建c ++ 0x功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Eclipse构建时,会收到关于c ++ 0x关键字的警告和错误。示例:

When build with Eclipse get warnings and errors about c++0x keywords. Example:


标识符decltype将成为C ++ 0x中的关键字

identifier ‘decltype’ will become a keyword in C++0x

如何解决此问题?

编辑:


Project-> Properties-> C / C ++ Build-> Discovery options-> GCC C ++
Compiler-> Compiler Invocation Arguments - > [ - E -P -v -dD
$ {plugin_state_location } /specs.c --std = gnu ++ 0x]

Project->Properties->C/C++ Build->Discovery options->GCC C++ Compiler->Compiler Invocation Arguments->[-E -P -v -dD ${plugin_state_location}/specs.c --std=gnu++0x]

但它没有效果,intresting,它将尝试编译具有相同的错误。不知道此参数需要什么(

but it hasnt effect, intresting, even if put there empty string it will try to compile with the same errors. Dont know for what this parameter needed(

推荐答案

请尝试以下操作:

项目 - >属性 - > C ++ - 构建[设置] - > G ++编译器[miscellanous] - >其他标志

Project -> Properties -> C++-Build[Settings] -> G++Compiler[miscellanous] -> Other flags

添加-std = c ++ 0x 有。

Add "-std=c++0x" there.

这篇关于用Eclipse构建c ++ 0x功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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