visharad
December 8th, 2006, 06:37 AM
Hi,
I wrote some code in C++ using Visual Studio 6.0. In that I used STL string by including <string>. It worked fine. Then I opened the same code in Visual Studio 2005 because I want to convert it into Visual C++.Net 2005.
I get the following error. Let me know what things I should change if a C++ code using STL is to be ported to C++.Net 2005. How to get rid of the following error? I am using string and map of STL? Do I need to make some changs for map also? Thanks.
I
Error 6 error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl std::operator<(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)" (__imp_??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z) referenced in function "public: bool __thiscall std::less<class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > >::operator()(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)const " (??R?$less@V?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@std@@QBE_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@0@Z)
I wrote some code in C++ using Visual Studio 6.0. In that I used STL string by including <string>. It worked fine. Then I opened the same code in Visual Studio 2005 because I want to convert it into Visual C++.Net 2005.
I get the following error. Let me know what things I should change if a C++ code using STL is to be ported to C++.Net 2005. How to get rid of the following error? I am using string and map of STL? Do I need to make some changs for map also? Thanks.
I
Error 6 error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl std::operator<(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)" (__imp_??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z) referenced in function "public: bool __thiscall std::less<class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > >::operator()(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &,class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)const " (??R?$less@V?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@@std@@QBE_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@0@Z)