[omniORB] omniORB_280 and Sun C++ 5.0

Brian Tolley B.Tolley@servicepower.com
Tue, 4 Apr 2000 10:57:04 +0100


I had similar error messages when using the Sun C++ 5.0 in version 4.0
compatibility mode with C++ namespace support enabled.

In my case it was apparently caused because the compiler objected to there
being two routines with different signatures in the same C++ namespace.
When I forced omniORB to declare 'omniORB' as a C++ class rather than having
it as a 
C++ namespace (by editing the 'CORBA_sysdep.h' so that
'HAS_Cplusplus_Namespace'
is not defined) the problem went away. I assumed this was a compiler fault,
but perhaps someone with more C++ knowledge than me will say whether or
nor C++ allows overloaded functions in the same C++ namespace. 

However I do not know however why you are getting the fault with the Sun C++
5.0 compiler (not in V4.0 compatibility mode), perhaps there are still C++
namespace
bugs in the compiler.

Brian

> -----Original Message-----
> From: Dr. Uwe C. Hinze [mailto:uhinze@ford.com]
> Sent: 04 April 2000 10:20
> To: omniORB, MailingList
> Subject: [omniORB] omniORB_280 and Sun C++ 5.0
> 
> 
> I cannot compile the following file in
>     omniORB_280src/lib/omniORB2/orbcore
> giopServer.cc,  exception.cc, policy.cc, scavenger.cc, objectRef.cc
> 
> using Sun C++ 5.0 with all new Compiler patches installed 
> using sun4_sosV_5.6.mk
> I get error messages like
> 
> CC -c -O2 -g   -DUsePthread -D_REENTRANT -mt -I. -I./.. 
> -I./../.. -DUSE_omniORB_logStream -D_OMNIORB2_LIBRARY 
> -DUnixArchitecture
> -DCONFIG_DEFAULT_LOCATION='"/etc/omniORB.cfg"' -I.  
> -I../../../../include -D__sparc__ -D__sunos__ 
> -D__OSVERSION__=5 -o giopServer.o
> giopServer.cc
> "giopServer.cc", line 980: Error: 
> omniORB::MaxMessageSize(unsigned), returning unsigned, was 
> previously declared returning void.
> 1 Error(s) detected.
> or:
> "objectRef.cc", line 827: Error: CORBA::UnMarshalObjRef(const 
> char*, MemBufferedStream&) already had a body defined.
> "objectRef.cc", line 914: Error: 
> CORBA::MarshalObjRef(CORBA::Object*, const char*, unsigned, 
> MemBufferedStream&) already had a body
> defined.
> 
> what can I do, to get omniORB_280 compiled with Sun C++ 5.0
>     best regards
>         Uwe
> 
> [demime 0.97b removed an attachment of type text/x-vcard 
> which had a name of uhinze.vcf]