[omniORB] omniidl bug in deep and complex namespaces

Juan Esteban Bernabó jbernab@OpenComm.com.br
Mon, 23 Jul 2001 18:06:07 -0300


I'm having a problem with namespaces with the omniidl and the c++ code it
generates.
We are implementing a javax::telephony interfaces implementation and it's
namespaces
are really deep, with some name clashes in diferents parts of the interface
definitions.
The idl file is almost 400kb so i'm not attaching it, but i found a real
short example that
gives the same result.

test.idl:
--------
module a
{

module b
{
interface Address
{

};
};

module c
{

module b
{
interface BAddress : a::b::Address
{

};

};

};

};


I pass this interface thru the omniidl with no errors but when i try to
compile the skeleton i get:


[jbernab@srv1 idl-tests]$ make testSK.o
g++ -c -I/home/jbernab/corba/omniORB_303/include/ -D__linux__ -D__x86__   -c
 -o testSK.o testSK.cc
In file included from testSK.cc:3:
test.hh:240: `_objref_Address' is not a class or namespace
test.hh:240: confused by earlier errors, bailing out
make: *** [testSK.o] Error 1


The omniidl generated this testSK.cc file:

      class AddressB :
        public virtual a::c::b::_impl_AddressB,
->        public virtual b::Address
      {

The signaled line is where the compiler gives an error.
I think the omniidl is trying to be smart but it generates invalid code for
this kind of namespaces declarations.

I think this is a bug on omniidl, please i would like to know if there is a
workaround easier than getting the .hh and SK.cc files and manually edit
them.

Thank you in advance,

Juan Bernabó
OpenComm do Brasil Ltda.