[omniORB] Nesting IDL files

Duncan Grisby dgrisby@uk.research.att.com
Wed, 25 Apr 2001 18:10:25 +0100


On Wednesday 25 April, "Olaf Meding" wrote:

> I tried your suggestions but am confused.  common.idl is included at the top
> of the interface.idl file (see below).  So why I need to tell the IDL
> compiler to compile common.idl file seperately?

Because that's the way omniidl works. It's what allows you to do
separate compilation of IDL files. You have to compile each top-level
IDL file separately.

Anyway, I've just checked in some updates to the C++ back-end of the
IDL compiler. First, IDL with #includes at non-file scope is properly
supported. The declarations are treated as if they were in the
including file, so there is no need to compile the included file
separately. I still strongly recommend against using this approach,
due to the possibility of interoperability problems over repository
identifiers.

Second, there is a new -Wbinline flag which outputs all #included
declarations inline with the main file. That allows you to just
compile interface.idl as you want above, but is not recommended since
it compromises the possibility of separate compilation. The main
reason the option is there is to cope with unpleasant situation where
IDL files have circular dependencies.

Cheers,

Duncan.

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