Eclipse CDT内置包括目录 [英] Eclipse CDT Builtin Include Directories

查看:346
本文介绍了Eclipse CDT内置包括目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  Eclipse CDT> 
项目设置>
C / C ++ General>
路径和符号>
包括>
GNU C ++

有一个包含路径列表。

$ b $


$ b

其他是内置



b

例如:

  /usr/include/C++/4.6/ 
/ usr / include / x86_64-linux-gnu
etc

如果我删除:

  work / .metadata / .plugins / org.eclipse.cdt.make.core / *。sc 



Eclipse启动时自动重新扫描路径。



我有gcc 4.6和gcc 4.7并行安装。



当Eclipse重新扫描时,只能找到4.6标题而不是4.7标题。 b
$ b

我的问题是:Eclipse通过什么机制来确定内置包含路径的列表? (因此为什么只找到4.6标题而不是4.7标题?)

解决方案

项目 - >属性 - > C / C ++ Build->发现选项。默认情况下,Eclipse将调用g ++来发现include目录。路径上的第一个g ++实例将被调用。您可以随时设置要用于您的项目的编译器的完整路径。


Under

Eclipse CDT >
    Project Settings > 
        C/C++ General >
            Paths and Symbols >
                 Includes >
                     GNU C++

There is a list of include paths.

Some are in bold and are project specific.

Others are builtin:

For example:

 /usr/include/C++/4.6/
 /usr/include/x86_64-linux-gnu
 etc

If I delete:

work/.metadata/.plugins/org.eclipse.cdt.make.core/*.sc

The paths are automatically rescanned when Eclipse launches.

I have gcc 4.6 and gcc 4.7 installed side-by-side.

When Eclipse rescans it only finds the 4.6 headers and not the 4.7 ones.

My question is this: By what mechanism does Eclipse determine the list of builtin include paths? (and hence why is it only finding the 4.6 headers and not the 4.7 headers?)

解决方案

This is controlled by the settings on Project->Properties->C/C++ Build->Discovery Options. By default, Eclipse will call g++ to discover the include directories. The first instance of g++ on the path will be the one that gets invoked. You can always set the full path to the compiler you want it to use for your project.

这篇关于Eclipse CDT内置包括目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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