[omniORB] Forward declarations and includes (IDL)

Carlos carlos@solaria-mediterranea.com
Fri, 21 Sep 2001 08:55:34 +0200


Matej Kenda wrote:
>=20
> We wanted to put all non-implementation files in a library. omniidl
> generated files do not compile.
>=20
> Matej
>=20
> -----Original Message-----
> From: Carlos [mailto:carlos@solaria-mediterranea.com]
> Sent: Friday, September 21, 2001 8:34 AM
> To: Matej Kenda
> Cc: omniORB-list (omniorb-list@uk.research.att.com)
> Subject: Re: [omniORB] Forward declarations and includes (IDL)
>=20
> Matej Kenda wrote:
>=20
> >
> > I have multiple CORBA classes and each of them is in its own IDL file.
> > Interfaces refer to each other directly or via sequences.
> >
> > The problem that I have is that omniidl compiler generates sources
> > without any problems, but the compiler complains with errors:
> >
> > g++ -Wall -D__linux__ -D__x86__ -D__OSVERSION__=3D2 -D_REENTRANT -I.
> > -I../../../ivd-3rdparty/omni/include   -c -o i_class_a.o i_class_a.cp=
p
> > In file included from i_class_a.h:26,
> >                  from i_class_a.cpp:3:
> > i_class_b.h:156: `i_ClassA_ptr' was not declared in this scope
> > i_class_b.h:156: parse error before `)'
> > i_class_b.h:157: syntax error before `*'
> > i_class_b.h:189: `i_ClassA_ptr' was not declared in this scope
> > i_class_b.h:189: parse error before `)'
> > i_class_b.h:190: ISO C++ forbids declaration of `i_ClassAList_t' with
> > no type
> > i_class_b.h:190: `i_ClassAList_t' declared as a `virtual' field
> > i_class_b.h:190: parse error before `*'
> >
> > I use omniORB 3.0.4 with latest updates.
> > g++ is version 2.96 (RedHat 7.1).
> >
>=20
> <snip>
>=20
> Hi all:
>=20
>         We have a similar situation with about 50 interfaces, without
> inheritance and the include statement before than forward declarations =
and
> don't have problems.
>=20
>         Can you tell us if the compilation problems are with the skelet=
ons
> or with the implementation?.
>=20
> Carlos
>=20
> Solaria Mediterr=E1nea, S.L.L.

Now we see the problem, we think that is a navigavility problem that
omniidl don't handle properly (perhaps a omniidl bug?). Interfaces A
needs to know B (A uses B) and viceversa. A workaround is put both
interfaces together in the same idl file.

Really our situation isn't similar.

Carlos
Solaria Mediterr=E1nea, S.L.L.