简体   繁体   English

Eclipse CDT Builtin包含目录

[英]Eclipse CDT Builtin Include Directories

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. Eclipse启动时会自动重新扫描路径。

I have gcc 4.6 and gcc 4.7 installed side-by-side. 我并排安装了gcc 4.6和gcc 4.7。

When Eclipse rescans it only finds the 4.6 headers and not the 4.7 ones. 当Eclipse重新扫描时,它只找到4.6标题,而不是4.7标题。

My question is this: By what mechanism does Eclipse determine the list of builtin include paths? 我的问题是:Eclipse通过什么机制确定内置包含路径的列表? (and hence why is it only finding the 4.6 headers and not the 4.7 headers?) (因此,为什么它只找到4.6头而不是4.7头?)

This is controlled by the settings on Project->Properties->C/C++ Build->Discovery Options. 这由Project-> Properties-> C / C ++ Build-> Discovery Options上的设置控制。 By default, Eclipse will call g++ to discover the include directories. 默认情况下,Eclipse将调用g ++来发现include目录。 The first instance of g++ on the path will be the one that gets invoked. 路径上的第一个g ++实例将是被调用的实例。 You can always set the full path to the compiler you want it to use for your project. 您始终可以设置要将其用于项目的编译器的完整路径。

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

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