[Botan-devel] Linking error
Jack Lloyd
lloyd at randombit.net
Mon Jul 2 12:15:56 EDT 2007
Are you sure that Botan, your test application, and any other
libraries you link with are all linked to the same C/C++ runtime? The
cause of most link errors under Visual Studio is using the debug
version for one and the release version for the other.
-Jack
On Mon, Jul 02, 2007 at 06:17:37PM +0200, Christophe Meessen wrote:
> Linking error when trying to compile simple program.
>
> I use botan 1.6.2 and compile with VC++2003. I compiled botan with the
> default options and
> simply added the following instruction at the start of my main routine
>
> Botan::LibraryInitializer init("thread_safe");
>
> Here are the linking errors
>
> Linking...
> libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall
> std::_Lockit::_Lockit(int)" (??0_Lockit at std@@QAE at H@Z) already defined in
> libbotan.lib(pipe_io.obj)
> libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall
> std::_Lockit::~_Lockit(void)" (??1_Lockit at std@@QAE at XZ) already defined
> in libbotan.lib(pipe_io.obj)
> libcpmtd.lib(xmutex.obj) : error LNK2005: "public: void __thiscall
> std::_Mutex::_Lock(void)" (?_Lock at _Mutex@std@@QAEXXZ) already defined in
> libbotan.lib(pipe_io.obj)
> libcpmtd.lib(xmutex.obj) : error LNK2005: "public: void __thiscall
> std::_Mutex::_Unlock(void)" (?_Unlock at _Mutex@std@@QAEXXZ) already
> defined in libbotan.lib(pipe_io.obj)
> LINK : warning LNK4098: defaultlib 'LIBC' conflicts with use of other
> libs; use /NODEFAULTLIB:library
> C:\xxx.exe : fatal error LNK1169: one or more multiply defined symbols found
>
>
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel
More information about the botan-devel
mailing list