public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
* Include question
@ 2002-01-24 11:41 speedy2
  2002-01-25 19:12 ` Ian Roxborough
  0 siblings, 1 reply; 2+ messages in thread
From: speedy2 @ 2002-01-24 11:41 UTC (permalink / raw)
  To: sourcenav

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Include question
  2002-01-24 11:41 Include question speedy2
@ 2002-01-25 19:12 ` Ian Roxborough
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Roxborough @ 2002-01-25 19:12 UTC (permalink / raw)
  To: speedy2; +Cc: sourcenav


Hi,

Source-Navigator should resolved the header file dependancies
automatically.  Can you see "port.h" in the symbol browser?

It might have a problem finding port.h if you can't see it
in the file/symbol browser.

There is a bug where if port.h is included in a2d.h and not
a .c file SN will have a problem finding port.h.

If you go to the includes section of compiler settings in 
the target editor then you can manually enter paths to be
search for includes.

Ian.


On Thu, 24 Jan 2002 13:14:40 -0500 (EST) speedy2 <speedy2@dag.net> wrote:
>
> 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.
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-24 19:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-24 11:41 Include question speedy2
2002-01-25 19:12 ` Ian Roxborough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).