简体   繁体   English

使用Eclipse构建C ++ 0x功能

[英]Build c++0x features with Eclipse

When build with Eclipse get warnings and errors about c++0x keywords. 使用Eclipse进行构建时,会收到有关c ++ 0x关键字的警告和错误。 Example: 例:

identifier 'decltype' will become a keyword in C++0x 标识符'decltype'将成为C ++ 0x中的关键字

How to workaround it? 如何解决呢?

EDIT: 编辑:

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] 项目->属性-> C / C ++构建->发现选项-> GCC C ++编译器->编译器调用参数-> [-E -P -v -dD $ {plugin_state_location} /specs.c --std = gnu ++ 0X]

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( 不知道该参数需要什么(

Try this: 尝试这个:

Project -> Properties -> C++-Build[Settings] -> G++Compiler[miscellanous] -> Other flags 项目->属性-> C ++-Build [Settings]-> G ++ Compiler [miscellanous]->其他标志

Add "-std=c++0x" there. 在此添加“ -std = c ++ 0x”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM