在Eclipse CDT(Juno / Kepler / Luna)索引器中启用C ++ 11 [英] Enable C++11 in Eclipse CDT (Juno/Kepler/Luna) indexer

查看:173
本文介绍了在Eclipse CDT(Juno / Kepler / Luna)索引器中启用C ++ 11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Juno / Kepler / Luna中的Eclipse CDT索引器上启用对新C ++标准的支持?

解决方案

注意,此问题(和答案)仅涉及在编译之前用于突出显示错误的 Eclipse索引器 C ++编译器设置未更改!(因此,编译可能会失败,因为缺少C ++ 11设置,但请查看相关部分)



要更改 Eclipse索引器设置,请转到
项目属性 - > C / C ++ c> - > - > 预处理器包括路径,宏等 - > > CDT GCC内置编译器设置



并附加 -std = c ++ 0x (或 -std = c ++ 11 )到命令以获取编译器规格:



之后它应该像:


$ {COMMAND} E -P -v -dD $ {INPUTS} -std = c ++ 0x




/ p>



相关





更新

使用Eclipse成功测试




  • Kepler(CDT 8.2)

  • Luna(CDT 8.4)


How do I enable support for the new C++ standard on the Eclipse CDT indexer in Juno/Kepler/Luna?

解决方案

Note that this question (and answer) only deals with the Eclipse indexer which is used to highlight errors before compilation takes place. The C++ compiler settings are not changed! (Thus, compilation could still fail because of missing C++11 settings, but have a look at the "Related" section)

To change the Eclipse indexer settings go to Project properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> tab Providers -> CDT GCC Built-in Compiler Settings

and append -std=c++0x (or -std=c++11) to Command to get compiler specs:

Afterwards it should look something like:

${COMMAND} -E -P -v -dD ${INPUTS} -std=c++0x

Sources

Related

Update

Successfully tested with Eclipse

  • Kepler (CDT 8.2)
  • Luna (CDT 8.4)

这篇关于在Eclipse CDT(Juno / Kepler / Luna)索引器中启用C ++ 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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