Gcc Linking

In Gcc is it possible to recursively compile .cpp files attached to one a single .cpp file until all associated files are compiled? And if not how would you accomplish this
What do you mean with ".cpp files attached to one a single .cpp" ?
I mean any files included directly or indirectly. As in program.c uses program.h and program.h in turn uses program2.h...etc. My problem is that I am trying to compile a test program for a library and even though I include the src path for the library in the '-I' flag i still get undefined references.

Sorry, if I am not explaining myself well.
Last edited on
No. You need makefiles for that. The GNU Make utility has the power to do what you want.

GNU Make
http://www.gnu.org/software/make/
Topic archived. No new replies allowed.