[Botan-devel] linking problem
Eini
newton2 at poczta.wp.pl
Tue Jun 26 12:23:52 EDT 2007
Warnings are not the thing I am concerned about. I have problem with
linker:
error LNK2001: unresolved external symbol ...
If I remove /NODEFAULTLIB then some conflicts with function names show up.
Example:
Error 4 error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >(void)"
(??1?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ)
already defined in libbotan.lib(init_def.obj) msvcprt.lib
and the source code is simple:
#include<botan/botan.h>
int main(int argc, char ** argv)
{
Botan::LibraryInitializer init;
return 0;
}
/NODEFAULTLIB is VC Studio proposition to solve this problem.
Thanks
Bartosz
Joel Low pisze:
> The compiler warnings are normal.
>
> However, remove /NODEFAULTLIB from the linker command line.
>
> Joel
>
> -----Original Message-----
> From: Eini [mailto:newton2 at poczta.wp.pl]
> Sent: 26 June 2007 10:23 PM
> To: Botan development list
> Subject: [Botan-devel] linking problem
>
> Hello
>
> After compiling Botan library for VC++ 2005 I tried to write my first
> application but unfortunately I get many linking stage errors and I
> just don't know what I am doing wrong. Please help.
>
> They look like this:
> ------ Build started: Project: test_bare, Configuration: Release Win32
> ------
> Compiling...
> main.cpp
> C:\libs\include\botan/base.h(29) : warning C4290: C++ exception
> specification ignored except to indicate a function is not
> __declspec(nothrow)
> C:\libs\include\botan/base.h(30) : warning C4290: C++ exception
> specification ignored except to indicate a function is not
> __declspec(nothrow)
> C:\libs\include\botan/base.h(158) : warning C4290: C++ exception
> specification ignored except to indicate a function is not
> __declspec(nothrow)
> Linking...
> libbotan.lib(big_ops2.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(divide.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(modebase.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(base64.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(data_src.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(pem.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(big_rand.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(make_prm.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(der_enc.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(asn1_str.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(datastor.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(asn1_int.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(cmac.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(pgp_s2k.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(pkcs5.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(ber_dec.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(tiger.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(sha160.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(x919_mac.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(hmac.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(misty1.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(lubyrack.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(arc4.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(par_hash.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(wid_wake.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(lion.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(safer_sk.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(rc5.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> libbotan.lib(square.obj) : error LNK2001: unresolved external symbol
> @__security_check_cookie at 4
> ...
>
> My project settings are:
>
> Compiler settings:
> /O2 /GL /I "C:\libs\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D
> "_WINDLL" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Fo"Release\\"
> /Fd"Release\vc80.pdb" /W3 /nologo /c /Wp64 /Zi /TP /errorReport:prompt
>
> Linker settings:
> /OUT:"C:\VCProjects\test_bare\Release\test_bare.dll" /INCREMENTAL:NO
> /NOLOGO /LIBPATH:"C:\libs" /DLL /MANIFEST
> /MANIFESTFILE:"Release\test_bare.dll.intermediate.manifest"
> /NODEFAULTLIB /DEBUG
> /PDB:"c:\VCProjects\test_bare\release\test_bare.pdb" /SUBSYSTEM:CONSOLE
> /OPT:REF /OPT:ICF /LTCG /MACHINE:X86 /ERRORREPORT:PROMPT libbotan.lib
> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
> shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
>
> Best regards
> Bartosz
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel
>
>
> _______________________________________________
> 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