I need to add several include directories to my project properties in Eclipse. I'm using Eclipse 4.3.2 with GCC C compiler. The directories with header files are composed of multiple subdirectories with new header files.
How do I tell the compiler to look in the subdirectories too during compiling?
Currently I go to
Project > Properties > tab C/C++ Build > settings > Tool settings > GCC C compiler > includes
There I add:
"${workspace_loc:/${ProjName}/Source/include}"
"${workspace_loc:/${ProjName}/Source/include/internal}"
"${workspace_loc:/${ProjName}/Source/include/internal/services}"
At this location I've added all subdirectories manually so that each subdirectory gets its own line. But I assume there is a simple command to let the compiler know to look in the subdirectories too? I'm looking for just a simple command to get rid of all these fixed paths.
Any suggestions are welcome. Thanks.
Unfortunately there is no way to add directories recursively. Usually, the fastest way to add a large number of directories is to manually add them to the .cproject
file.
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