[omniORB] Including CosLifeCycle

Duncan Grisby dgrisby@uk.research.att.com
Tue, 15 May 2001 10:59:18 +0100


On Thursday 10 May, David Hyde wrote:

> The point is that I want to append non default header file suffixes to my
> generated files.  If the compiler allows this to be done then shouldn't it
> protect against these kinds of errors?
> 
> I suppose that your argument will be that the compiler doesn't know which of
> my "#include *.idl" statements refer to files who's headers haven't been
> changed.  Is there no way round this?

I think the proper solution is to fix the IDL compiler output to
always use the same guard defines, no matter what suffix you are
using. As a fix in the mean-time, you can put the following at the
start of your IDL files:

#pragma hh #include <omniORB3/Naming.hh>
#pragma hh #define __CosNaming__Omni_h_EXTERNAL_GUARD__
#pragma hh #include <COS/CosLifeCycle.hh>
#pragma hh #define __CosLifeCycle__Omni_h_EXTERNAL_GUARD__

Those definitions will be copied into the output _Omni.h file, and
will prevent the generated code trying to #include the wrong things.

Cheers,

Duncan.

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