[omniORB] help on mangled names

Donna Maskell Donna.Maskell@udlp.com
Wed, 20 Feb 2002 14:04:15 -0600



I have been having no problem with omniORB 3.04, using the Microsoft
Visual Studio C++ version 6.0 compiler to compile it and to build, for
example, the "echo" example. Now I have tried to transform some code of
my own to work with the ORB and have a problem.

I used omniidl with the -Wbexamples option to generate code files for a
server class. There were no errors. I filled in the implementation
source file to provide a print statement in each method. When I build my
project, it says it cannot find various items, e.g.

CAgsManagerSK.obj : error LNK2001: unresolved external symbol "public:
static unsigned int __cdecl CActivateMsg_Helper::NP_alignedSize(class
_objref_CActivateMsg *,unsigned int)"
(?NP_alignedSize@CActivateMsg_Helper@@SAIPAV_objref_CActivateMsg@@I@Z)
CAgsManagerSK.obj : error LNK2001: unresolved external symbol "public:
static void __cdecl CActivateMsg_Helper::marshalObjRef(class
_objref_CActivateMsg *,class NetBufferedStream &)"
(?marshalObjRef@CActivateMsg_Helper@@SAXPAV_objref_CActivateMsg@@A
AVNetBufferedStream@@@Z)
CAgsManagerSK.obj : error LNK2001: unresolved external symbol "public:
static unsigned int __cdecl
CActivateElementMsg_Helper::NP_alignedSize(class
_objref_CActivateElementMsg *,unsigned int)"
(?NP_alignedSize@CActivateElementMsg_Helper@@SAIPAV_objr
ef_CActivateElementMsg@@I@Z)
CAgsManagerSK.obj : error LNK2001: unresolved external symbol "public:
static void __cdecl CActivateElementMsg_Helper::marshalObjRef(class
_objref_CActivateElementMsg *,class NetBufferedStream &)"
(?marshalObjRef@CActivateElementMsg_Helper@@SAXPAV_o
bjref_CActivateElementMsg@@AAVNetBufferedStream@@@Z)

All my code is C++ and I wouldn't think I would have to put "extern
"C"" in front of everything. Since it is all using the same compiler, it
should be able to mangle names it looks for the same way it mangled them
in their declarations. I don't know whether this is an omniORB problem
but I doubt it. It seems to be confusion on the part of the MSVC
utility. However, I am hoping someone out there can say definitively
that this is the case.

I have checked the project settings to be suitable for a Win32 Release
configuration, as described in README_win32, "Building Projects using
omniORB", step c. This was based on MSVC 4.2; does anyone know if it has
changed, and if so what the MSVC 6.0 settings should be?

Thank you in advance for any help.

Donna