[omniORB] Conflict with "StructMember"

Mike Ladwig mike@twinpeaks.prc.com
Thu, 15 Apr 1999 10:13:21 -0400


I'm sorry, I made a mistake in my original posting; I was trying to get
InterfaceDef, and not TypeCode.  The problem still remains.  I have been
able to reproduce the problem using the "echo" example from the
distribution:  modify the "echo.idl" file to include <ir.idl> and have
the automatically generated stub/skeleton and header file manifest the
errors.

To test it, I had to modify (the two -I directives with "mike" mentioned
are mine) the mk.unix file to add include paths so the idl and .hh files
could find things properly:

OMNIORB2_IDL_ANY_FLAGS = -a -I/home/mike/omniORB_2.7.1/idl
OMNIORB2_IDL = $(OMNIORB2_IDL_ONLY) $(OMNIORB2_IDL_ANY_FLAGS)
OMNIORB2_CPPFLAGS = -D__OMNIORB2__ -I$(CORBA_STUB_DIR)
$(OMNITHREAD_CPPFLAGS) -I/home/mike/omniORB_2.7.1/include/omniORB2

mike.

David Riddoch wrote:
> 
> You do not need to include ir.idl to use TypeCode. It is automatically
> pre-defined by the compiler. You should refer to it with its fully
> qualified name, CORBA::TypeCode.
> 
> David
> 
> On Wed, 14 Apr 1999, Mike Ladwig wrote:
> 
> > Hi.  I am porting some code from Orbix, and have had generally decent
> > luck so far.  I am stuck, however, on a problem porting my
> > implementation of the Query service.  I've looked in the mailing list
> > archives without luck.
> >
> > In my "CosQuery.idl" file, I need the definition of TypeCode, so I
> > include "ir.idl" to get it.  The idl compiler generates a stub/skeleton
> > file that includes the generated "CosQuery.hh" file, which in turn
> > includes "ir.hh".
> >
> > The "ir.hh" file includes both CORBA.h and corbaidl.hh.  These files
> > both attempt to define several conflicting names (starting with
> > ::CORBA::StructMember), and my compilation fails.
> >
> > Any suggestions?  I'm sure I'm missing something because this seems to
> > be a common thing to wish to accomplish, but I can't figure out what...
> >
> > Thanks,
> > mike.
> >
> >