How to link to static libraries
"Vlad Vetiul" <[email protected]> Wed, 23 Oct 2002 11:03:12 +0300
| Newsgroups | gmane.ietf.sfl |
|---|---|
| Message-ID | <[email protected]> |
Hi All! I tried to build my own DLL using static SFL libraries in MSVS6 (with SP4). I added to project following static libs: smime/smime/lib/libsmdSTATIC.lib smime/smime/lib/libCertSTATIC.lib smime/smime/lib/libCtilMgrSTATIC.lib smime/SMPDist/esnacc/c++/lib/cppasn1_static.lib smime/cml/lib/cmlasnSTATIC.lib and non-static libs: smime/SMPDist/cml/lib/srlapi.lib smime/SMPDist/cml/lib/cmapi.lib ldap/lib/nsldap32v50.lib Linker reports warnings and errors, here some of them: LINK : warning LNK4049: locally defined symbol ""public: virtual __thiscall SNACC::AsnOid::~AsnOid(void)" (??1AsnOid@SNACC@@UAE@XZ)" imported LINK : warning LNK4049: locally defined symbol ""public: class CTIL::CSM_CtilInst * __thiscall CTIL::CSM_CtilMgr::AddLogin(char *,char *)" (?AddLogin@CSM_CtilMgr@CTIL@@QAEPAVCSM_CtilInst@2@PAD0@Z)" imported LINK : warning LNK4049: locally defined symbol ""public: __thiscall SNACC::AsnOid::AsnOid(char const *)" (??0AsnOid@SNACC@@QAE@PBD@Z)" imported LINK : warning LNK4049: locally defined symbol ""public: __thiscall CTIL::CSM_CtilMgr::CSM_CtilMgr(void)" (??0CSM_CtilMgr@CTIL@@QAE@XZ)" imported LINK : warning LNK4049: locally defined symbol ""public: __thiscall CTIL::CSM_CtilMgr::~CSM_CtilMgr(void)" (??1CSM_CtilMgr@CTIL@@QAE@XZ)" imported LINK : warning LNK4049: locally defined symbol ""public: void __thiscall CTIL::CSM_CtilMgr::UseAll(void)" (?UseAll@CSM_CtilMgr@CTIL@@QAEXXZ)" imported ... cmlasnSTATIC.lib(SelectedAttributeTypes.obj) : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall SNACC::AsnString::BEnc(class SNACC::AsnBuf &)" (?BEnc@AsnString@SNACC@@UAEIAAVAsnBuf@2@@Z) cmlasnSTATIC.lib(PKIX.obj) : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall SNACC::AsnString::BEnc(class SNACC::AsnBuf &)" (?BEnc@AsnString@SNACC@@UAEIAAVAsnBuf@2@@Z) ... libCertSTATIC.lib(sm_GenName.obj) : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall SNACC::AsnString::BEnc(class SNACC::AsnBuf &)" (?BEnc@AsnString@SNACC@@UAEIAAVAsnBuf@2@@Z) cmlasnSTATIC.lib(AuthenticationFramework.obj) : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall SNACC::AsnString::BEnc(class SNACC::AsnBuf &)" (?BEnc@AsnString@SNACC@@UAEIAAVAsnBuf@2@@Z) cmlasnSTATIC.lib(sdn702.obj) : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall SNACC::AsnString::BEnc(class SNACC::AsnBuf &)" (?BEnc@AsnString@SNACC@@UAEIAAVAsnBuf@2@@Z) libsmdSTATIC.lib(sm_cms.obj) : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall SNACC::AsnString::BEnc(class SNACC::AsnBuf &)" (?BEnc@AsnString@SNACC@@UAEIAAVAsnBuf@2@@Z) ... cmlasnSTATIC.lib(CM_Certificate.obj) : error LNK2001: unresolved external symbol _CM_FreeCert cmlasnSTATIC.lib(CM_Certificate.obj) : error LNK2001: unresolved external symbol _CMASN_FreePubKeyContents cmlasnSTATIC.lib(CM_Certificate.obj) : error LNK2001: unresolved external symbol _gDSA_KEA_OID cmlasnSTATIC.lib(CM_Certificate.obj) : error LNK2001: unresolved external symbol _gRSA_OID cmlasnSTATIC.lib(CM_Certificate.obj) : error LNK2001: unresolved external symbol _gOIW_DSA ... With LIBCTILMGRDLL_API="",SNACCDLL_API="",VDASNACCDLL_API="",EXPORT_GENSNACC="",CMLASN_API="" defined these errors don't go away. Can somebody tell me how to build an application with these static libraries used? Thank you. -- DISCLAIMER: Any e-mail messages from the National Bank of Moldova are sent in good faith, but shall not be binding nor construed as constituting any obligation on the part of the Bank. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you received this in error, please contact the sender and delete the material from any computer.