[omniORB] Forward declarations and includes (IDL)

Matej Kenda matej.kenda@hermes.si
Mon, 24 Sep 2001 07:56:35 +0200


Hi,

Thanks for the advices, Duncan. We will most probably have quite some IDLs
that will be maintained by different people. We will use the second advice
that you gave.

Regards,

Matej

-----Original Message-----
From: Duncan Grisby [mailto:dgrisby@uk.research.att.com] 
Sent: Friday, September 21, 2001 5:10 PM
To: Matej Kenda
Cc: omniORB-list (omniorb-list@uk.research.att.com)
Subject: Re: [omniORB] Forward declarations and includes (IDL) 


On Friday 21 September, Matej Kenda wrote:

> 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:

[...]
> Are the IDLs written wrongly or is there something else that is not OK 
> in my case?

The problem is that you have circular dependencies between your IDL files.
The generated code can't cope with that.

By far the best thing to do is to put all dependent interfaces into the same
file. That way, the output will compile successfully. If you _have_ to use
separate files, you can work-around the problem by creating a new IDL file
that #includes all your other files. Then compile that file with the
-Wbinline flag to omniidl. That will output all the declarations in a single
file, rather that using separate files for each input IDL file.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --