[omniORB] Windows link error using static libs
Sai-Lai Lo
S.Lo@uk.research.att.com
30 Sep 1999 10:27:38 +0100
James,
There are 2 problems:
1. It is quite important to remember that the name of the runtime library
includes the minor version number. In your case the link line should
look like this:
link /nologo /subsystem:console /incremental:no
/out:TestAdapterIFB.exe
TestAdapterIFB.obj ActionQueue_c.obj Workflow_c.obj
omniORB280_rt.lib omniDynamic280_rt.lib omnithread2_rt.lib
wsock32.lib advapi32.lib -libpath:c:\OmniORB_280\lib\x86_win32
If you just use omniORB2.lib and omnithread.lib, you end up linking the
static library and not the DLLs. I guess this is not what you want.
2. Since 2.7.x, the runtime library has been splited into the orbcore
runtime and the dynamic runtime.
On all other platforms, if you don't pass the -a flag to omniidl2 and
you don't use Any, Typecode, DSI, DII and all the dynamic interfaces,
you do not have to link in the dynamic runtime.
However, for what I suspect is a compile issue, VSC++ insists on
generating references to the dynamic runtime even when no dynamic
interfaces are used. Therefore you have to link in
omniDynamic280_rt.lib always. There is a workaround. Please read
my posting 2 days ago for details:
http://www.uk.research.att.com/omniORB/archives/1999-09/0281.html
Sai-Lai
>>>>> James Dempsey writes:
> Hi,
> I've just upgraded from OmniORB2.6.1 to OmniORB2.8.0 and
> I'm having problems linking my application. I'm using
> Visual C++ 5.0 and linking in the static libraries using
> the following command line:
> link /nologo /subsystem:console /incremental:no
> /out:TestAdapterIFB.exe
> TestAdapterIFB.obj ActionQueue_c.obj Workflow_c.obj omniORB2.lib
> omnithread.lib
> wsock32.lib advapi32.lib -libpath:c:\OmniORB_280\lib\x86_win32
> I get the following errors:
> omniORB2.lib(gatekeeper.o) : error LNK2001: unresolved external
> symbol "public:
> __thiscall CORBA::TypeCode_member::~TypeCode_member(void)"
> (??1TypeCode_member@C
> ORBA@@QAE@XZ)
> omniORB2.lib(tcpSocketMTfactory.o) : error LNK2001: unresolved
> external symbol "
> public: __thiscall
> CORBA::TypeCode_member::~TypeCode_member(void)" (??1TypeCode_
> member@CORBA@@QAE@XZ)
> omniORB2.lib(libcWrapper.o) : error LNK2001: unresolved external
> symbol "public:
> __thiscall CORBA::TypeCode_member::~TypeCode_member(void)"
> (??1TypeCode_member@
> CORBA@@QAE@XZ)
> omniORB2.lib(relStream.o) : error LNK2001: unresolved external
> symbol "public: _
> _thiscall CORBA::TypeCode_member::~TypeCode_member(void)"
> (??1TypeCode_member@CO
> RBA@@QAE@XZ)
> <..... more of the same ....>
> This used to work fine with 2.6.1. Any ideas what I'm doing
> wrong?
--
Sai-Lai Lo S.Lo@uk.research.att.com
AT&T Laboratories Cambridge WWW: http://www.uk.research.att.com
24a Trumpington Street Tel: +44 1223 343000
Cambridge CB2 1QA Fax: +44 1223 313542
ENGLAND