[omniORB] Linking with omniDynamic280_rt.lib

Constantin Adam ctin@comet.columbia.edu
Fri, 19 May 2000 20:12:44 -0400 (EDT)


Hi,

I have a couple of questions related to the use of the
omniDynamic280_rt.lib library.  

I have defined two files: NodeID.idl and test.cpp.

The IDL does not use 'any' structures.  My understanding was that I
don't need omniDynamic280_rt.lib in this case. However, it was
impossible to link the files without the omniDynamic280_rt.lib
library.

What am I missing?  Is it possible to avoid linking with this
library?  Does avoiding this library translate into any performance
improvements?  (reduced size of the code, memory consumption, speed)

Thank you in advance for your answers.

Constantin

P.S. I have appended the files and the compilation commands I have
used.

----------------------------NodeID.idl----------------------------

struct NodeID
{
  string id;
};

----------------------------test.cpp----------------------------

#include "NodeID.hh"
#include <windows.h>

void main()
{
  NodeID id;

  while(1)
    Sleep(10000);
}
------------------------IDL compilation-----------------------------

COMMAND PROMPT> omniidl2 NodeID.idl

-------------------------------C++ compilation----------------------

COMMAND PROMPT> cl test.cpp nodeidsk.cpp omniorb280_rt.lib omnithread2_rt.lib -Ix:\omniorb_280\include /D__WIN32__ /D__x86__ /D__NT__ /D__OSVERSION__=4
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

test.cpp
nodeidsk.cpp
Generating Code...
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:test.exe
test.obj
nodeidsk.obj
x:\omniorb_280\lib\x86_win32\omniorb280_rt.lib
x:\omniorb_280\lib\x86_win32\omnithread2_rt.lib
test.obj : error LNK2001: unresolved external symbol "public: __thiscall CORBA::TypeCode_member::~TypeCode_member(void)" (??1TypeCode_member@CORBA@@QAE@XZ)
nodeidsk.obj : error LNK2001: unresolved external symbol "public: __thiscall CORBA::TypeCode_member::~TypeCode_member(void)" (??1TypeCode_member@CORBA@@QAE@XZ)
test.obj : error LNK2001: unresolved external symbol "public: __thiscall CORBA::Any::~Any(void)" (??1Any@CORBA@@QAE@XZ)
nodeidsk.obj : error LNK2001: unresolved external symbol "public: __thiscall CORBA::Any::~Any(void)" (??1Any@CORBA@@QAE@XZ)
test.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CORBA::IDLType_Helper::release(class CORBA::IDLType *)" (?release@IDLType_Helper@CORBA@@SAXPAVIDLType@2@@Z)
nodeidsk.obj : error LNK2001: unresolved external symbol "public: static void __cdecl CORBA::IDLType_Helper::release(class CORBA::IDLType *)" (?release@IDLType_Helper@CORBA@@SAXPAVIDLType@2@@Z)
test.exe : fatal error LNK1120: 3 unresolved externals