[Botan-devel] Tons of linker errors with MFC...
Helms, Jim
jhelms at drti.com
Thu Dec 6 14:47:17 EST 2007
Hi,
I'm working with Botan in an MFC application under VC 7.1 and am getting
tons of linker errors. I wrote a separate console application with the
same build of Botan and it worked fine. Are there conflicts between
Botan and MFC? Here are the errors:
KeyFileGenerator4000 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(pipe.obj)
KeyFileGenerator4000 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(pipe.obj)
KeyFileGenerator4000 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> >(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at ABV
01@@Z) already defined in libbotan.lib(pipe.obj)
KeyFileGenerator4000 error LNK2005: "public: char const * __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::c_str(void)const "
(?c_str@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBE
PBDXZ) already defined in libbotan.lib(pipe.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::operator=(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??4?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV0
1 at ABV01@@Z) already defined in libbotan.lib(pipe.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::operator+=(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(??Y?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV0
1 at ABV01@@Z) already defined in libbotan.lib(pipe.obj)
KeyFileGenerator4000 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> >(unsigned int,char)"
(??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at ID@
Z) already defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::operator+=(char
const *)"
(??Y?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV0
1 at PBD@Z) already defined in libbotan.lib(x509_key.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::operator+=(char)"
(??Y?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV0
1 at D@Z) already defined in libbotan.lib(base64.obj)
KeyFileGenerator4000 error LNK2005: "public: void __thiscall
std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)"
(?setstate@?$basic_ios at DU?$char_traits at D@std@@@std@@QAEXH_N at Z) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::append(unsigned
int,char)"
(?append@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QA
EAAV12 at ID@Z) already defined in libbotan.lib(base64.obj)
KeyFileGenerator4000 error LNK2005: "public: bool __thiscall
std::ctype<char>::is(short,char)const " (?is@?$ctype at D@std@@QBE_NFD at Z)
already defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: static char __cdecl
std::char_traits<char>::to_char_type(int const &)"
(?to_char_type@?$char_traits at D@std@@SADABH at Z) already defined in
libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: static bool __cdecl
std::char_traits<char>::eq_int_type(int const &,int const &)"
(?eq_int_type@?$char_traits at D@std@@SA_NABH0 at Z) already defined in
libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: static int __cdecl
std::char_traits<char>::eof(void)" (?eof@?$char_traits at D@std@@SAHXZ)
already defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: int __thiscall
std::basic_streambuf<char,struct std::char_traits<char> >::snextc(void)"
(?snextc@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEHXZ) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: int __thiscall
std::basic_streambuf<char,struct std::char_traits<char> >::sgetc(void)"
(?sgetc@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEHXZ) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall
std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const "
(?rdbuf@?$basic_ios at DU?$char_traits at D@std@@@std@@QBEPAV?$basic_streambuf
@DU?$char_traits at D@std@@@2 at XZ) already defined in
libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: unsigned int __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::max_size(void)const "
(?max_size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@
QBEIXZ) already defined in libbotan.lib(pipe.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::erase(unsigned
int,unsigned int)"
(?erase@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE
AAV12 at II@Z) already defined in libbotan.lib(pipe.obj)
KeyFileGenerator4000 error LNK2005: "public: __thiscall
std::locale::~locale(void)" (??1locale at std@@QAE at XZ) already defined in
libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: class std::locale
__thiscall std::ios_base::getloc(void)const "
(?getloc at ios_base@std@@QBE?AVlocale at 2@XZ) already defined in
libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: bool __thiscall
std::basic_istream<char,struct std::char_traits<char> >::_Ipfx(bool)"
(?_Ipfx@?$basic_istream at DU?$char_traits at D@std@@@std@@QAE_N_N at Z) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: void __thiscall
std::basic_streambuf<char,struct std::char_traits<char>
>::_Unlock(void)"
(?_Unlock@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEXXZ) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: void __thiscall
std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)"
(?_Lock@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEXXZ) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: __thiscall
std::_Lockit::~_Lockit(void)" (??1_Lockit at std@@QAE at XZ) already defined
in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: void __thiscall
std::locale::facet::_Incref(void)" (?_Incref at facet@locale at std@@QAEXXZ)
already defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: static unsigned int __cdecl
std::ctype<char>::_Getcat(class std::locale::facet const * *)"
(?_Getcat@?$ctype at D@std@@SAIPAPBVfacet at locale@2@@Z) already defined in
libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: __thiscall
std::locale::id::operator unsigned int(void)" (??Bid at locale@std@@QAEIXZ)
already defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: __thiscall
std::_Lockit::_Lockit(int)" (??0_Lockit at std@@QAE at H@Z) already defined in
libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: char __thiscall
std::basic_ios<char,struct std::char_traits<char> >::widen(char)const "
(?widen@?$basic_ios at DU?$char_traits at D@std@@@std@@QBEDD at Z) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: unsigned int __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::size(void)const "
(?size@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBEI
XZ) already defined in libbotan.lib(pipe.obj)
KeyFileGenerator4000 error LNK2005: "public: int __thiscall
std::basic_streambuf<char,struct std::char_traits<char> >::sbumpc(void)"
(?sbumpc@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEHXZ) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: static int __cdecl
std::char_traits<char>::to_int_type(char const &)"
(?to_int_type@?$char_traits at D@std@@SAHABD at Z) already defined in
libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: char const & __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::operator[](unsigned int)const "
(??A?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBEABDI
@Z) already defined in libbotan.lib(pem.obj)
KeyFileGenerator4000 error LNK2005: "public: int __thiscall
std::ios_base::flags(void)const " (?flags at ios_base@std@@QBEHXZ) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_ostream<char,struct std::char_traits<char> > & __thiscall
std::basic_ostream<char,struct std::char_traits<char> >::flush(void)"
(?flush@?$basic_ostream at DU?$char_traits at D@std@@@std@@QAEAAV12 at XZ)
already defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_ostream<char,struct std::char_traits<char> > * __thiscall
std::basic_ios<char,struct std::char_traits<char> >::tie(void)const "
(?tie@?$basic_ios at DU?$char_traits at D@std@@@std@@QBEPAV?$basic_ostream at DU?
$char_traits at D@std@@@2 at XZ) already defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: bool __thiscall
std::ios_base::good(void)const " (?good at ios_base@std@@QBE_NXZ) already
defined in libbotan.lib(data_src.obj)
KeyFileGenerator4000 error LNK2005: "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::append(char const
*)"
(?append@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QA
EAAV12 at PBD@Z) already defined in libbotan.lib(x509_key.obj)
KeyFileGenerator4000 error LNK2005: "public: void __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::clear(void)"
(?clear@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE
XXZ) already defined in libbotan.lib(parsing.obj)
KeyFileGenerator4000 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)"
(??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ)
already defined in libbotan.lib(pipe.obj)
KeyFileGenerator4000 error LNK2005: "public: class std::locale::facet
const * __thiscall std::locale::_Getfacet(unsigned int)const "
(?_Getfacet at locale@std@@QBEPBVfacet at 12@I at Z) already defined in
msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: "public: void __thiscall
std::locale::facet::_Register(void)"
(?_Register at facet@locale at std@@QAEXXZ) already defined in
msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: "public: __thiscall
std::_Locinfo::~_Locinfo(void)" (??1_Locinfo at std@@QAE at XZ) already
defined in msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: "public: __thiscall
std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo at std@@QAE at PBD@Z)
already defined in msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: "public: __thiscall
std::locale::locale(void)" (??0locale at std@@QAE at XZ) already defined in
msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: "public: void __thiscall
std::ios_base::_Addstd(void)" (?_Addstd at ios_base@std@@QAEXXZ) already
defined in msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: "public: virtual __thiscall
std::ios_base::~ios_base(void)" (??1ios_base at std@@UAE at XZ) already
defined in msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: "public: void __thiscall
std::ios_base::clear(int,bool)" (?clear at ios_base@std@@QAEXH_N at Z) already
defined in msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: "protected: void __thiscall
std::ios_base::_Init(void)" (?_Init at ios_base@std@@IAEXXZ) already
defined in msvcprtd.lib(MSVCP71D.dll)
KeyFileGenerator4000 error LNK2005: _exit already defined in
msvcrtd.lib(MSVCR71D.dll)
KeyFileGenerator4000 error LNK2005: __exit already defined in
msvcrtd.lib(MSVCR71D.dll)
KeyFileGenerator4000 error LNK2005: __cexit already defined in
msvcrtd.lib(MSVCR71D.dll)
KeyFileGenerator4000 error LNK2005: __c_exit already defined in
msvcrtd.lib(MSVCR71D.dll)
KeyFileGenerator4000 error LNK2005: __XcptFilter already defined in
msvcrtd.lib(MSVCR71D.dll)
KeyFileGenerator4000 error LNK2005: __amsg_exit already defined in
msvcrtd.lib(MSVCR71D.dll)
KeyFileGenerator4000 error LNK2005: ___xc_z already defined in
msvcrtd.lib(cinitexe.obj)
KeyFileGenerator4000 error LNK2005: ___xc_a already defined in
msvcrtd.lib(cinitexe.obj)
KeyFileGenerator4000 error LNK2005: ___xi_z already defined in
msvcrtd.lib(cinitexe.obj)
KeyFileGenerator4000 error LNK2005: ___xi_a already defined in
msvcrtd.lib(cinitexe.obj)
KeyFileGenerator4000 error LNK2005: __setmbcp already defined in
LIBC.lib(mbctype.obj)
KeyFileGenerator4000 warning LNK4098: defaultlib 'msvcrtd.lib' conflicts
with use of other libs; use /NODEFAULTLIB:library
KeyFileGenerator4000 warning LNK4098: defaultlib 'LIBC' conflicts with
use of other libs; use /NODEFAULTLIB:library
KeyFileGenerator4000 error LNK2019: unresolved external symbol _main
referenced in function _mainCRTStartup
KeyFileGenerator4000 fatal error LNK1120: 1 unresolved externals
Any ideas what might be causing this?
Thank you,
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.randombit.net/pipermail/botan-devel/attachments/20071206/8e110cf7/attachment-0001.htm
More information about the botan-devel
mailing list