[omniORB] linking statically under win32

Sai-Lai Lo S.Lo@uk.research.att.com
17 Jul 2000 11:56:43 +0100


Jonathan,

Have you added the pre-preprocessor macro -D_WINSTATIC to the compiler's
command line argument? If not _declspec(dllimport) will be added to all
the symbols you've listed.

This is documented in README.win32 under the title "Building Projects using
omniORB". 

Sai-Lai

>>>>> Jonathan Clark writes:

> When I link with omni using the static library under win32 I get the
> following warnings.

> LINK : warning LNK4049: locally defined symbol ""public: __thiscall
> omni_thread::init_t::init_t(void)" (??0init_t@omni_thread@@QAE@XZ)" imported
> LINK : warning LNK4049: locally defined symbol ""char const * const
> omniORB_3_0" (?omniORB_3_0@@3PBDB)" imported
> LINK : warning LNK4049: locally defined symbol ""public: static unsigned
> long const  CORBA::Object::_PR_magic" (?_PR_magic@Object@CORBA@@2KB)"
> imported
> LINK : warning LNK4049: locally defined symbol ""public: static char const *
> const  CORBA::Object::_PD_repoId" (?_PD_repoId@Object@CORBA@@2PBDB)"
> imported
> LINK : warning LNK4049: locally defined symbol ""int  omniORB::traceLevel"
> (?traceLevel@omniORB@@3HA)" imported
> LINK : warning LNK4049: locally defined symbol ""public: static unsigned
> char const  omni::myByteOrder" (?myByteOrder@omni@@2EB)" imported
> LINK : warning LNK4049: locally defined symbol ""public: static char const *
> const  omni::empty_string" (?empty_string@omni@@2QBDB)" imported

> According to MS's site this linker error means :
> "The symbol was both exported from and imported to the program."


-- 
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