Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse compiler include path subdir

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.

like image 959
Qwedvit Avatar asked Apr 17 '15 09:04

Qwedvit


1 Answers

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.

like image 57
MikeMB Avatar answered Oct 20 '22 06:10

MikeMB