Problem building an application over SFL
"Gianluca Ramunno" <[email protected]>
| Newsgroups | gmane.ietf.sfl |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I'm trying to build (VC++) a very simple command-line application which does (or should do ...) following operations: * login & sign * login & verify There is no problem for the login. It works well (verified by means of debug) using CSM_AppLogin class (using Free3 CTIL & Crypto++ 3.1). The problem is signing. When I try to insert instructions into C++ code for instancing CSM_MsgToSign class (static instance defining a class variable or dynamic instance using a pointer and 'new' keyword), the linker return to me a lot of errors I can't understand what is wrong!!! I would appreciate any help!!! Thank's Gianluca Ramunno ******************************************* code causing errors: CSM_MsgToSign *m_pESSignMsg; //this definition is in a header file (escmd.h) CSM_Buffer *p; p= new CSM_Buffer(DATA_TO_BE_SIGNED_FILENAME); m_pESSignMsg= (CSM_MsgToSign *) new CSM_MsgToSign(p); or CSM_MsgToSign m_ESSignMsg; *********************** Some info about building * Win32 Console application (escmd.exe), Debug Multithread * from header file (escmd.h): #include "sm_api.h" #include "sm_AppLogin.h" * I copied all SFL libraries (.lib and .dll) in a directory under root dir of my project (setting this libraries in linker options) * I set include path in compiler options to all SmimeR1.6 include directories *********************** Linker error --------------------Configuration: escmd - Win32 Debug-------------------- Compiling... escmd.cpp Linking... libCertDLLd.lib(libCertDLLd.dll) : error LNK2005: "public: virtual __thiscall CSM_OID::~CSM_OID(void)" (??1CSM_OID@@UAE@XZ) already defined in escmd.obj msvcirtd.lib(MSVCIRTD.dll) : error LNK2005: "public: class ostream & __thiscall ostream::operator<<(char const *)" (??6ostream@@QAEAAV0@PBD@Z) already defined in libcimtd.lib(ostream.obj) msvcirtd.lib(MSVCIRTD.dll) : error LNK2005: "public: class ostream & __thiscall ostream::flush(void)" (?flush@ostream@@QAEAAV1@XZ) already defined in libcimtd.lib(ostream.obj) LINK : warning LNK4049: locally defined symbol "_free" imported LINK : warning LNK4049: locally defined symbol "_calloc" imported LINK : warning LNK4049: locally defined symbol "_abort" imported LINK : warning LNK4049: locally defined symbol "_sprintf" imported libsmutild.lib(sm_cms.obj) : error LNK2001: unresolved external symbol __imp__longjmp libsmutild.lib(sm_ess.obj) : error LNK2001: unresolved external symbol __imp__longjmp libsmutild.lib(sm_Attr.obj) : error LNK2001: unresolved external symbol __imp__strdup libsmutild.lib(sm_MsgSignerInfo.obj) : error LNK2001: unresolved external symbol __imp__strdup OLDNAMES.lib(strdup.obi) : error LNK2001: unresolved external symbol __imp__strdup OLDNAMES.lib(strdup.obi) : error LNK2001: unresolved external symbol __imp___strdup lib/escmd.exe : fatal error LNK1120: 3 unresolved externals Error executing link.exe.