Re: [gob-list] include problem (please help!)

From: George <jirka_at_5z.com>
Date: Sun, 6 Aug 2000 15:17:39 -0700

On Sat, Aug 05, 2000 at 02:57:09PM +0200, Stefan Rieken wrote:
> I do not like to bother you all at a ratio that I do now, but I am
> really stuck with this problem, and I can't find a way out. It has put
> my programming activity to zero for the past week or so, while I was
> planning to do very much in that time :-(

Don't worry about asking, that's what the list is for.

> The problem is that I have to include object Foo in object Bar, and vice
> versa, like this:

OK, this is an old issue, and not just with GOB, many people solve it in
different ways. The way GOB solves it is this: In the header file, when it
declares the typedef for the type, it declares it as:

#ifndef __TYPEDEF_FOO__
#define __TYPEDEF_FOO__
typedef struct _Foo Foo;
#endif

You can just add this to %h{ %} in bar.gob instead of including foo.h. This
way you can refer to the Foo type without having to include the entire file.

George

-- 
George <jirka_at_5z.com>
   Whenever you find that you are on the side of the majority,
   it is time to reform.
                       -- Mark Twain
Received on Sun Aug 06 2000 - 15:22:15 CDT

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT