[omniORB] Forward declarations and includes (IDL)
Duncan Grisby
dgrisby@uk.research.att.com
Fri, 21 Sep 2001 16:10:20 +0100
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 --