Eclipse CDT Builtin Include Directories

心不动则不痛 提交于 2019-12-20 10:39:46

问题


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?)


回答1:


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.



来源:https://stackoverflow.com/questions/9864003/eclipse-cdt-builtin-include-directories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!