[omniORB] omniORB2 with Borland C++ Builder app => Compilation Errors!!!

David Morgenlender dmorgen@alum.mit.edu
Sun, 19 Apr 1998 19:42:52 GMT


Sai-Lai,

>The overloaded operator bug is quite fatal. It may be possible to
>workaround the problem by not defining the operators for enum and switch=
 to
>some explicit marshalling functions. This is tedious and involving =
manually
>editing the stub code. I would not suggest you doing that unless you =
have
>no choice.=20
>
>It may be worth looking at other orbs to see if they are hit by the same
>problem.=20

WE HAVE A SOLUTION!!!  Somebody on one of the Borland BCB newsgroups came=
 up
with it.  The following is required before main() in WIB():

	using namespace X;

I've confirmed this does in fact fix the enum overload "bug"!!!

The problem with "cerr << string" displaying a pointer value (it treats =
the
overload as for void*) still happens in some, but not all cases.


Also, Borland came up with a fix for the first problem I encountered:
assignment to an enum generates an "lvalue required" error.  The solution=
 is to
use:

	#pragma option -b+

This forces enums to be allocated as ints.

Borland claims the enum assignment syntax is invalid if this option is =
off.  I
can't find this documented anywhere.  I also can't find anything in =
Stroustrup
indicating this is an invalid syntax.  Furthermore, the option is =
documented as
defaulting to ON & I've never turned it off!  IAE, at least the program =
is
working.


So the only remaining problem is the "cerr << string" problem.  But that =
may not
be a show stopper.

Do you see any reason I shouldn't move ahead with the "Borland-ready" =
omniORB2
you've created?

BTW, I'll be working on something else over the next few days to a week. =
 The
system I need for development on this project is going in for repair =
tomorrow!

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Dave Morgenlender
e-mail: dmorgen@alum.mit.edu
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D