[omniORB] Linking problems in MSVC++ 5.0
Dee Jay Randall
randal@cs.uregina.ca
Mon, 9 Nov 1998 14:53:33 -0600 (CST)
Hmmm. I've only installed omniORB 2.6.1. I don't know how I could
possibly have gotten pre-2.6.x runtime libraries. And I don't get
an undefined symbol: omniORB_2_6.
I get 31 LINK2001: unresolved external symbol "blahblah" errors.
None of them are for the symbol omniORB_2_6.
I downloaded omniORB_2_6_1_x86_win32.zip on November 4, so I can't
see old files as the problem. I am re-downloading the files just to be
sure. I would be surprised if that is the problem.
I can find omniORB_2_6 in omniinternal.h, and my application
doesn't complain about not finding it, so I think it is finding
that symbol no problem.
Looking inside some of the include files.... Perhaps
"HAS_Cplusplus_Namespace" is not being defined somehow?
Thanks,
Dee Jay Randall _-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_
randal@cs.uregina.ca | "While reality is neither black and white nor |
{ } right and wrong, those are the only ideals { }
_-__-_ ouch, { } against which we can evaluate our decisions." { }
> < that hurt | -me |
_) chomp (___________ ~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~
On 9 Nov 1998, Sai-Lai Lo wrote:
> >>>>> Dee Jay Randall writes:
> >
> > I did manage to build the echo example, and it worked fine.
> > Yes, in eg1.obj, the external symbol name of CORBA::string_free
> > is ?string_free@CORBA@@YAXPAD@Z
> >
> > Here is what I get when I do a dumpbin on eg1.obj and server.obj
> > (server.obj is my file that is causing the trouble):
> >
> > eg1.obj:
> > 024 00000000 UNDEF notype () External | ?string_free@CORBA@@YAXPAD@Z
> > (void __cdecl CORBA::string_free(char *))
> >
> > server.obj:
> > 051 00000000 UNDEF notype () External | ?string_free@CORBA@@SAXPAD@Z
> > (public: static void __cdecl CORBA::string_free(char *))
> >
> > The "public: static" part is obviously the problem (right?), but how
> > do I get rid of it?
>
> I think I know what is wrong. Do you have a pre-2.6.x version in your
> development tree? I think when you built server.obj, the omniORB2 header
> files from a pre-2.6.x distribution got included instead of the 2.6.x
> headers.
>
> One of the changes in 2.6.x is the use of C++ namespace to represent CORBA
> modules when compiled with MSVC++. This is why the signature of
> CORBA::string_free is now:
> void __cdecl CORBA::string_free(char *);
>
> In pre-2.6.x versions, CORBA is a C++ class, hence the signature of
> CORBA::string_free is:
>
> public: static void __cdecl CORBA::string_free(char *)
>
>
> By the way, there is a guard against accidentally linking stubs generated
> by the 2.6.x omniidl2 with the pre-2.6.x runtime. The linkage would fail at
> least with the undefined symbol omniORB_2_6, which is only present in the
> 2.6.x runtime. In your case, this undefined symbol must have been hidden by
> the hundreds of undefined symbols causes by the namespace change.
>
> Obviously, you just have to remove the old headers from your development
> tree and make sure that the 2.6.x headers are picked up.
>
>
> Tell us if this solves your problem.
>
>
> Regards,
>
> Sai-Lai
>
>
> --
> Dr. Sai-Lai Lo | Research Scientist
> |
> E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab
> | 24a Trumpington Street
> Tel: +44 223 343000 | Cambridge CB2 1QA
> Fax: +44 223 313542 | ENGLAND
>