# Help in telling compiler to include header files for C

• C/++/#
This one
>gcc einterp_mex.c -LC:\Users\atrch\Documents\MATLAB\geos\mvep2\mutils-0.4\mutils\libutils
Since that is the command you are using, assuming the header files are located in that folder, try this:
Code:
gcc einterp_mex.c -IC:\Users\atrch\Documents\MATLAB\geos\mvep2\mutils-0.4\mutils\libutils
Note that it is a capital i (I). Not a lower case L. I write the note because some fonts make them look very similar.

Also, if you are 100% sure that all those third party headers provided are included with #include "file" and not #include <file>, you can be even more specific and use:
Code:
gcc einterp_mex.c -iquoteC:\Users\atrch\Documents\MATLAB\geos\mvep2\mutils-0.4\mutils\libutils
gcc -Ldir -- Here dir is the full path where your include files are.
A little correction in case anyone wants to know the actual use , -Ldir is actually used for the subprogram ld for linking, not header includes. I say it because the referenced documents doesn't explicitly say it.

Atr cheema
Mark44
Mentor
A little correction in case anyone wants to know the actual use , -Ldir is actually used for the subprogram ld for linking, not header includes. I say it because the referenced documents doesn't explicitly say it.
OK, that makes sense that -L would be used for library files, not include files.

Psinter
jtbell
Mentor
Right,

-Idirectory (uppercase letter "eye") specifies where to look for include-files when compiling;

-Ldirectory specifies where to look for previously-compiled libraries when linking.