Include question

speedy2 speedy2@dag.net
Thu Jan 24 11:41:00 GMT 2002


Hello all.

For a project I am working on,("testproj") I have split my code into
blocks(like "a2d" and "port") and put them in a directory structure like:

\testproj\port\port.c
\testproj\port\port.h

\testproj\a2d\a2d.c
\testproj\a2d\a2d.h

Files like a2d.c end up including port.h with a simple #include port.h

Of course gcc does not compile because port.h is not in the path and the
only fix is to hardcode the include or do it relatively like
"../port/port.h"

Is it possible when setting up Source Navigator to build, to get it to
find dependant files and automatically invoke gcc with the right options?

That way in my a2d.c file I can leave the include as:
#include "port.h"

and allow SNAV to figure it out?

Thanks,
Speedy2.



More information about the Sourcenav mailing list