[Botan-devel] linking problem
Eini
newton2 at poczta.wp.pl
Tue Jun 26 15:38:38 EDT 2007
Linking libbufferoverflowu.lib helped with some of my problems. But
after disable /NOSTANDARDLIBS I get:
Error 1 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
Error 2 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> >(char const *)"
(??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at PBD@Z)
already defined in libbotan.lib(init_def.obj) msvcprt.lib
Error 3 error LNK2005: "private: static class std::locale::_Locimp
* __cdecl std::locale::_Getgloballocale(void)"
(?_Getgloballocale at locale@std@@CAPAV_Locimp at 12@XZ) already defined in
msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 4 error LNK2005: "private: static void __cdecl
std::locale::facet::facet_Register(class std::locale::facet *)"
(?facet_Register at facet@locale at std@@CAXPAV123@@Z) already defined in
msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 5 error LNK2005: "public: static void __cdecl
std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)"
(?_Locinfo_dtor at _Locinfo@std@@SAXPAV12@@Z) already defined in
msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 6 error LNK2005: "private: static class std::locale::_Locimp
* __cdecl std::locale::_Init(void)"
(?_Init at locale@std@@CAPAV_Locimp at 12@XZ) already defined in
msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 7 error LNK2005: "public: static void __cdecl
std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)"
(?_Locinfo_ctor at _Locinfo@std@@SAXPAV12 at PBD@Z) already defined in
msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 8 error LNK2005: "public: static void __cdecl
std::ios_base::_Addstd(class std::ios_base *)"
(?_Addstd at ios_base@std@@SAXPAV12@@Z) already defined in
msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 9 error LNK2005: "private: static void __cdecl
std::ios_base::_Ios_base_dtor(class std::ios_base *)"
(?_Ios_base_dtor at ios_base@std@@CAXPAV12@@Z) already defined in
msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 10 error LNK2005: "public: __thiscall
std::_Lockit::_Lockit(int)" (??0_Lockit at std@@QAE at H@Z) already defined in
msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 11 error LNK2005: "public: __thiscall
std::_Lockit::~_Lockit(void)" (??1_Lockit at std@@QAE at XZ) already defined
in msvcprt.lib(MSVCP80.dll) libcpmt.lib
Error 12 error LNK2005: __invalid_parameter_noinfo already defined
in MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 13 error LNK2005: __encode_pointer already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 14 error LNK2005: __encoded_null already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 15 error LNK2005: __decode_pointer already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 16 error LNK2005: __malloc_crt already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 17 error LNK2005: __amsg_exit already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 18 error LNK2005: __initterm_e already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 19 error LNK2005: __unlock already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 20 error LNK2005: __lock already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 21 error LNK2005: ___CppXcptFilter already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
Error 22 error LNK2005: ___xi_a already defined in
MSVCRT.lib(cinitexe.obj) LIBCMT.lib
Error 23 error LNK2005: ___xi_z already defined in
MSVCRT.lib(cinitexe.obj) LIBCMT.lib
Error 24 error LNK2005: ___xc_a already defined in
MSVCRT.lib(cinitexe.obj) LIBCMT.lib
Error 25 error LNK2005: ___xc_z already defined in
MSVCRT.lib(cinitexe.obj) LIBCMT.lib
Error 26 error LNK2005: "void __cdecl terminate(void)"
(?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib
Error 27 error LNK2005: _tolower already defined in
MSVCRT.lib(MSVCR80.dll) LIBCMT.lib
and with /NOSTANDARDLIB enabled linker lacks of many basic function
definitions like:
Linking...
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup at 12
libbotan.lib(base64.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception::exception(char const * const &)"
(??0exception at std@@QAE at ABQBD@Z)
libbotan.lib(make_prm.obj) : error LNK2001: unresolved external symbol
"public: __thiscall std::exception::exception(char const * const &)"
(??0exception at std@@QAE at ABQBD@Z)
and so on.
If someone has any suggestion I will be very grateful.
Regards
Bartosz
Jack Lloyd pisze:
> On Tue, Jun 26, 2007 at 04:22:50PM +0200, Eini wrote:
>
>> C:\libs\include\botan/base.h(29) : warning C4290: C++ exception
>> specification ignored except to indicate a function is not
>> __declspec(nothrow)
>>
>
> These are just warning that Visual Studio doesn't fully implement the
> standard, but it's fairly harmless in this case.
>
>
>
>> Linking...
>> libbotan.lib(big_ops2.obj) : error LNK2001: unresolved external symbol
>> @__security_check_cookie at 4
>>
>
> It appears that you either need to get a new version of the SDK, or
> explicitly request a link against 'bufferoverflow.lib'. According to
> MSDN, some versions of Visual Studio enable cookie checking for buffer
> overflows by default, and there doesn't (seem) to be any way to
> disable that. More information @ http://support.microsoft.com/kb/894573
>
> -Jack
> _______________________________________________
> 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