V
vivek_mendse
Guest
Hello
I migrating projects from VS 2005 to VS 2015, while migrating one of the DLL project Test.dll which has a static library as input staticLib.lib.
staticLib.lib. gives multiple linking LNK 2001 & LNK 2019 errors with cpp standard library. here i am giving few below (there are many more than 100). However if I change project type from DLL to static library as Test.lib then code builds without any error.
I check on internet and then confirms that both project are build with VS 2015 using Unicode Character set and build with multi threaded debug dll as run time library. can someone please help.
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2019 unresolved external symbol "__declspec(dllimport) struct std::_Smanip<int> __cdecl std::setw(int)" (__imp_?setw@std@@YA?AU?$_Smanip@H@1@H@Z) referenced in function "public: virtual void __thiscall XCLTlvContainer::dump(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?dump@XCLTlvContainer@@UBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) struct std::_Smanip<int> __cdecl std::setw(int)" (__imp_?setw@std@@YA?AU?$_Smanip@H@1@H@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Vector_val<class XCLTlvData *,class std::allocator<class XCLTlvData *> >::~_Vector_val<class XCLTlvData *,class std::allocator<class XCLTlvData *> >(void)" (??1?$_Vector_val@PAVXCLTlvData@@V?$allocator@PAVXCLTlvData@@@std@@@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Vector_val<class XCLTlvData *,class std::allocator<class XCLTlvData *> >::_Vector_val<class XCLTlvData *,class std::allocator<class XCLTlvData *> >(class std::allocator<class XCLTlvData *>)" (??0?$_Vector_val@PAVXCLTlvData@@V?$allocator@PAVXCLTlvData@@@std@@@std@@IAE@V?$allocator@PAVXCLTlvData@@@1@@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(struct std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::_Has_debug_it)" (__imp_??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@U_Has_debug_it@01@@Z) referenced in function "class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __cdecl XCL:arseSemiOctetRepresentation(class std::basic_string<unsigned char,struct std::char_traits<unsigned char>,class std::allocator<unsigned char> > const &)" (?parseSemiOctetRepresentation@XCL@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@ABV?$basic_string@EU?$char_traits@E@std@@V?$allocator@E@2@@3@@Z)
LNK2019 unresolved external symbol "__declspec(dllimport) 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> >(struct std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Has_debug_it)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@U_Has_debug_it@01@@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl XCL::encodeAsString<long>(long,enum XCL::ENUM_ENCODE_MODE,long)" (??$encodeAsString@J@XCL@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@JW4ENUM_ENCODE_MODE@0@J@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) 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> >(struct std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Has_debug_it)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@U_Has_debug_it@01@@Z)
Continue reading...
I migrating projects from VS 2005 to VS 2015, while migrating one of the DLL project Test.dll which has a static library as input staticLib.lib.
staticLib.lib. gives multiple linking LNK 2001 & LNK 2019 errors with cpp standard library. here i am giving few below (there are many more than 100). However if I change project type from DLL to static library as Test.lib then code builds without any error.
I check on internet and then confirms that both project are build with VS 2015 using Unicode Character set and build with multi threaded debug dll as run time library. can someone please help.
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2019 unresolved external symbol "__declspec(dllimport) struct std::_Smanip<int> __cdecl std::setw(int)" (__imp_?setw@std@@YA?AU?$_Smanip@H@1@H@Z) referenced in function "public: virtual void __thiscall XCLTlvContainer::dump(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?dump@XCLTlvContainer@@UBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) struct std::_Smanip<int> __cdecl std::setw(int)" (__imp_?setw@std@@YA?AU?$_Smanip@H@1@H@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::~_String_base(void)" (__imp_??1_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_String_base::_String_base(void)" (__imp_??0_String_base@std@@QAE@XZ)
LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Vector_val<class XCLTlvData *,class std::allocator<class XCLTlvData *> >::~_Vector_val<class XCLTlvData *,class std::allocator<class XCLTlvData *> >(void)" (??1?$_Vector_val@PAVXCLTlvData@@V?$allocator@PAVXCLTlvData@@@std@@@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Vector_val<class XCLTlvData *,class std::allocator<class XCLTlvData *> >::_Vector_val<class XCLTlvData *,class std::allocator<class XCLTlvData *> >(class std::allocator<class XCLTlvData *>)" (??0?$_Vector_val@PAVXCLTlvData@@V?$allocator@PAVXCLTlvData@@@std@@@std@@IAE@V?$allocator@PAVXCLTlvData@@@1@@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)
LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(void)" (__imp_??0exception@std@@QAE@XZ)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(struct std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::_Has_debug_it)" (__imp_??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@U_Has_debug_it@01@@Z) referenced in function "class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __cdecl XCL:arseSemiOctetRepresentation(class std::basic_string<unsigned char,struct std::char_traits<unsigned char>,class std::allocator<unsigned char> > const &)" (?parseSemiOctetRepresentation@XCL@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@ABV?$basic_string@EU?$char_traits@E@std@@V?$allocator@E@2@@3@@Z)
LNK2019 unresolved external symbol "__declspec(dllimport) 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> >(struct std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Has_debug_it)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@U_Has_debug_it@01@@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl XCL::encodeAsString<long>(long,enum XCL::ENUM_ENCODE_MODE,long)" (??$encodeAsString@J@XCL@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@JW4ENUM_ENCODE_MODE@0@J@Z)
LNK2001 unresolved external symbol "__declspec(dllimport) 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> >(struct std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Has_debug_it)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@U_Has_debug_it@01@@Z)
Continue reading...