如何在Eclipse中指定c ++系统包含路径? [英] How to specify c++ system include path in Eclipse?

查看:850
本文介绍了如何在Eclipse中指定c ++系统包含路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GCC具有将目录作为系统目录的选项 - 系统,以便不会为这些目录生成编译警告。但是我在Eclipse中找不到类似的设置(我使用的是Mars 2 Release 4.5.2)。在项目属性/C / C ++常规/预处理器包含路径,宏等添加包含目录时,尝试检查包含系统标题/CDT用户设置条目,但没有帮助任何建议?

GCC has the option -isystem to treat the directories as system directory so that compile warning is not generated for these directories. However I couldn't find similar settings in Eclipse (I am using Mars 2 Release 4.5.2). Have tried checking "Contains system header" when adding "include Directory" in "Project properties"/"C/C++ General"/Preprocessor Include Paths, Macros etc."/"CDT User Setting Entries" but doesn't help. Any suggestion?

推荐答案

尝试取消选中
$ b中的 CDT GCC内置编译器设置 $ b 项目属性 / C / C ++常规 / 预处理器包含路径,宏等 / 提供商

并将您自己的包含路径添加到

C / C ++常规 / 路径和符号 / 包含 / GNU C C ++

Try to uncheck the CDT GCC Built-in Compiler Settings in
Project Properties / C/C++ General / Preprocessor Include Paths, Macros etc / Providers
And add your own include path in
C/C++ General / Paths and Symbols / Includes / GNU C or C++

这篇关于如何在Eclipse中指定c ++系统包含路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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