Monday, 9 September 2013

Handling #include in C with makefiles

Handling #include in C with makefiles

I am in the process of porting some code that was developed in the
codeblocks IDE. I am transferring it to a Linux server where I can only
use the command line to compile the code. The code is quite large (maybe
100 files) and I need to update the include commands in many files. For
when I try to compile it errors on for instance:
#include with a file cannot be found error. I am assuming it cannot be
found because the location of the gsl folder was declared in one of the
search directory field options in the IDE. I could go through each file an
update to the correct path, but is there a better way of doing this for
use with a makefile?
Thanks!

No comments:

Post a Comment