Hi Yulong, C4786 can be safely ignored with a #pragma.
The LNK2001 almost looks like the Crypto++ library was built with a 3rd party STL. The project is MDI. MFC uses a different STL implementation (M$ implementation). If I recall correctly, Views are iterated in an MDI - hence the reason for the M$ STL code in a MDI. SDI projects do not have this problem. My solution in the past was to have a build of Crypto++ that used M$'s version of the STL when working with MDI projects. Jeff -----Original Message----- From: 曹玉龙 [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 4:56 AM To: Walton, Jeffrey (Contractor) Subject: link error with crypto++ 521 Hi, jeffrey I am writing some code on Crypto++521, and have some link error, like [EMAIL PROTECTED] had said in the maillist. Then I read the article http://www.codeguru.com/Cpp/Cpp/algorithms/article.php/c5133, download the demo you provided. when I build the demo source, a lot of Errors still exist. I build the cryptlib.lib at first(include debug & release version) Could you give me some advices? Thank you. The Error Message: Deleting intermediate files and output files for project 'dirtypad - Win32 Debug'. --------------------Configuration: dirtypad - Win32 Debug-------------------- Compiling resources... Compiling... StdAfx.cpp Compiling... dirtypad.cpp dirtypadDoc.cpp dirtypadView.cpp E:\temp\Testing\DirtyPad\dirtypadView.cpp(55) : warning C4100: 'pDC' : unreferenced formal parameter MainFrm.cpp Generating Code... warning C4786: 'CryptoPP::ClonableImpl<CryptoPP::SHA256,CryptoPP::AlgorithmImpl<CryptoPP::I teratedHash<unsigned int,CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256> >::~ClonableImpl<CryptoPP::SHA256 ,CryptoPP::AlgorithmImpl<CryptoPP::IteratedHash<unsigned int,CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256> >' : identifier was truncated to '255' characters in the debug information warning C4786: 'CryptoPP::AlgorithmImpl<CryptoPP::IteratedHash<unsigned int, CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256>::~ AlgorithmImpl<CryptoPP::IteratedHash<unsigned int,CryptoPP::EnumToType< enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256>' : identifier was truncated to '255' characters in the debug information warning C4786: 'CryptoPP::ClonableImpl<CryptoPP::SHA256,CryptoPP::AlgorithmImpl<CryptoPP::I teratedHash<unsigned int,CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256> >::ClonableImpl<CryptoPP::SHA256, CryptoPP::AlgorithmImpl<CryptoPP::IteratedHash<unsigned int,CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256> >' : identifier was truncated to '255' characters in the debug information warning C4786: 'CryptoPP::AlgorithmImpl<CryptoPP::IteratedHash<unsigned int, CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256>::A lgorithmImpl<CryptoPP::IteratedHash<unsigned int,CryptoPP::EnumToType<e num CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256>' : identifier was truncated to '255' characters in the debug information warning C4786: 'CryptoPP::ClonableImpl<CryptoPP::SHA256,CryptoPP::AlgorithmImpl<CryptoPP::I teratedHash<unsigned int,CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256> >::ClonableImpl<CryptoPP::SHA256, CryptoPP::AlgorithmImpl<CryptoPP::IteratedHash<unsigned int,CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256> >' : identifier was truncated to '255' characters in the debug information warning C4786: 'CryptoPP::AlgorithmImpl<CryptoPP::IteratedHash<unsigned int, CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256>::A lgorithmImpl<CryptoPP::IteratedHash<unsigned int,CryptoPP::EnumToType<e num CryptoPP::ByteOrder,1>,64,CryptoPP::HashTransformation>,CryptoPP::SHA256>' : identifier was truncated to '255' characters in the debug information Linking... LINK : warning LNK4049: locally defined symbol ""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 *,class ba sic_string<char,struct std::char_traits<char>,class std::allocator<char> >::allocator<char> const &)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@2@@std@@[EMAIL PROTECTED] [EMAIL PROTECTED]@1@@Z)" imported LINK : warning LNK4049: locally defined symbol ""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_s [EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@2@@std@@[EMAIL PROTECTED])" imported LINK : warning LNK4049: locally defined symbol ""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 basic_string<ch ar,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@2@@std@@[EMAIL PROTECTED]@@ Z)" imported LINK : warning LNK4049: locally defined symbol ""public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " ([EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@[EMAIL PROTECTED]@2@@st d@@QBEPBDXZ)" imported libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___setlc_active libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___setlc_active libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___setlc_active libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___setlc_active libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___setlc_active libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___lc_handle libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___lc_handle libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___lc_handle libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___lc_handle libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___lc_handle libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol __pctype libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol __pctype libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __pctype libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___mb_cur_max libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___mb_cur_max libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___mb_cur_max libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___mb_cur_max libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol ___mb_cur_max libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___lc_codepage libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___lc_codepage libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___lc_codepage libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___lc_codepage libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___lc_collate_cp Debug/dirtypad.exe : fatal error LNK1120: 7 unresolved externals Error executing link.exe. dirtypad.exe - 29 error(s), 11 warning(s)
