Eclipse Kepler CDT包含外部头文件/递归添加外部包含路径(带有子文件夹) [英] Eclipse Kepler CDT include external header files / Add External Include Path recursively ( with subfolders )
问题描述
我有一个嵌入式C项目,所有基本C库都存储在一个外部文件夹中(而不是在工作区中)。我可以编译,因为编译器知道在哪里查找此文件,但是Eclipse不知道这些文件存在,并且收到错误消息:
Hi I have a embedded C project and all the basic C libraries are stored in an external folder ( not in the workspace ). I can compile because the compiler knows where to look for this files, but Eclipse does not know that these files exist and I get error messages:
我可以手动添加一个文件夹,其内容如下: rightClickOnProject-> Properties-> C / C ++包含路径和
符号->添加外部包含路径
I can manually add one folder with: rightClickOnProject->Properties->C/C++ Include Paths and
Symbols -> Add External Include Path
例如,文件< stdint.h>
位于文件夹 C:\embARM7\yagarto\arm-elf\include
中,因此我将执行以下操作:
For example the file <stdint.h>
is located in the folder C:\embARM7\yagarto\arm-elf\include
so I do the following:
此解决< stdint.h>
的月食错误标记,但是文件< ; stdio.h>
位于文件夹 C:\embARM7\yagarto\arm-elf\include\sys
和我必须重新进行整个过程:
But the file <stdio.h>
is located in the folder C:\embARM7\yagarto\arm-elf\include\sys
and I have to make the whole process again for:
C:\embARM7\yagarto\arm-elf\include中。
\机器,依此类推....
Now the next header file is located in C:\embARM7\yagarto\arm-elf\include\machine
and so on and so forth....
我的问题是:
是否可以添加所有子文件夹的外部包含路径?
一种添加此文件夹和所有子文件夹 /递归添加此文件夹的种类。
像 C:\embARM7\yagarto\arm-elf\include\ *
这样,我不必在文件夹中添加每个文件夹手动构建。对于一个项目来说,这是5分钟,但是我必须对10个项目这样做,这种工作有点糟。
My Question is :
Is there a way to add an external include path with ALL subfolders ?
Kind of "add this folder and all subfolders" / "add this folder recursively".
Like C:\embARM7\yagarto\arm-elf\include\*
so that I do not have to add every folder in the folder structure manually. For one project this is 5 minutes but I have to do it for 10 projects and this work kind of sucks.
谢谢
推荐答案
在将一组外部标头添加到我的项目中时,我也遇到了同样的问题。我没有在项目属性中使用包含路径和符号,而是向项目添加了到根目录的链接,该目录在其子目录中包含所有外部标头。这样做是这样的:
I also came across the same issue while to add set of external headers into my project. Instead of using include Paths and Symbols in the Project Properties, I added to my project a link to the root directory which contains all the external headers within its sub-directory. This is how to do it:
-
rightClickOnProject-> New->文件夹
, - 单击
新建文件夹
对话框中的高级
按钮, - 选择
链接到备用位置
选项框, - 浏览到包含以下内容的根目录所有标题,然后
- 点击
完成
按钮。
rightClickOnProject->New->Folder
,- Click on
Advanced
button in theNew Folder
dialog box, - select
Link to alternate location
option box, - Browse to your the root directory containing all your headers, and
- Hit the
Finish
button.
欢呼
这篇关于Eclipse Kepler CDT包含外部头文件/递归添加外部包含路径(带有子文件夹)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!