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:
I can manually add one folder with: rightClickOnProject->Properties->C/C++ Include Paths and
Symbols -> Add External Include Path
For example the file <stdint.h>
is located in the folder C:\embARM7\yagarto\arm-elf\include
so I do the following:
This solves the eclipse error marker for <stdint.h>
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:
Now the next header file is located in C:\embARM7\yagarto\arm-elf\include\machine
and so on and so forth....
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.
Thanks
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->Folder
,Advanced
button in the New Folder
dialog box,Link to alternate location
option box,Finish
button.Cheers
I haven't found such option neither in Eclipse 3.7-4.3 nor in MS VS2012. Apparently the workaround is to write a script in any language which would generate the recursive path for you.
For Eclipse, you can write an .xml file with project settings and then import it (Project properties -> C/C++ General -> Paths and Symbols -> Import Settings...). To make an idea of the structure of this file, start by exporting your current project settings somewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With