LNK2019: unresolved external symbol errors after migrating down to VS2013

I have had to migrate down to VS2013 for my project. Originaly when I was working in VS2017 I was able to add a dll that I created (also in VS2017) without any link errors. However since I moved to VS2013 I have been unable to add the dll without getting these link errors:
(Gsi is the name of my project)

Error 4 error LNK2019: unresolved external symbol __imp___hypot referenced in function _hypot C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (__imp_?_Debug_message@std@@YAXPB_W0I@Z) referenced in function "void __cdecl std::_Debug_pointer<char>(char const *,wchar_t const *,unsigned int)" (??$_Debug_pointer@D@std@@YAXPBDPB_WI@Z) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 6 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base12::_Container_base12(void)" (__imp_??0_Container_base12@std@@QAE@XZ) referenced in function "public: __thiscall std::_String_val<struct std::_Simple_types<char> >::_String_val<struct std::_Simple_types<char> >(void)" (??0?$_String_val@U?$_Simple_types@D@std@@@std@@QAE@XZ) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 7 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base12::~_Container_base12(void)" (__imp_??1_Container_base12@std@@QAE@XZ) referenced in function "public: __thiscall std::_String_val<struct std::_Simple_types<char> >::~_String_val<struct std::_Simple_types<char> >(void)" (??1?$_String_val@U?$_Simple_types@D@std@@@std@@QAE@XZ) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 8 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base12::_Orphan_all(void)" (__imp_?_Orphan_all@_Container_base12@std@@QAEXXZ) referenced in function "public: void __thiscall std::_String_alloc<0,struct std::_String_base_types<char,class std::allocator<char> > >::_Free_proxy(void)" (?_Free_proxy@?$_String_alloc@$0A@U?$_String_base_types@DV?$allocator@D@std@@@std@@@std@@QAEXXZ) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 9 error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Xbad_alloc(void)" (__imp_?_Xbad_alloc@std@@YAXXZ) referenced in function "char * __cdecl std::_Allocate<char>(unsigned int,char *)" (??$_Allocate@D@std@@YAPADIPAD@Z) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 10 error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Xlength_error(char const *)" (__imp_?_Xlength_error@std@@YAXPBD@Z) referenced in function "public: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Xlen(void)const " (?_Xlen@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEXXZ) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 11 error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Xout_of_range(char const *)" (__imp_?_Xout_of_range@std@@YAXPBD@Z) referenced in function "public: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Xran(void)const " (?_Xran@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEXXZ) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 12 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::locale::id::id(unsigned int)" (__imp_??0id@locale@std@@QAE@I@Z) referenced in function "void __cdecl `dynamic initializer for 'public: static class std::locale::id std::num_put<char,class std::back_insert_iterator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >::id''(void)" (??__E?id@?$num_put@DV?$back_insert_iterator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@@std@@2V0locale@2@A@@YAXXZ) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 13 error LNK2019: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Syserror_map(int)" (__imp_?_Syserror_map@std@@YAPBDH@Z) referenced in function "public: virtual class std::error_condition __thiscall std::_System_error_category::default_error_condition(int)const " (?default_error_condition@_System_error_category@std@@UBE?AVerror_condition@2@H@Z) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 14 error LNK2019: unresolved external symbol "__declspec(dllimport) char const * __cdecl std::_Winerror_map(int)" (__imp_?_Winerror_map@std@@YAPBDH@Z) referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::_System_error_category::message(int)const " (?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@H@Z) C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Gsi\Gsi.obj Gsi
Error 15 error LNK1120: 11 unresolved externals C:\Users\h6565169\Documents\tps_trunk\G2GsiBridge\Development\Debug\Gsi.exe Gsi

I have rebuilt the dll in VS2013 and re-added it to my project thinking that that was the problem originally, however, nothing changed. My project compiles fine on it's own in VS2013 and I can add my dll to other projects in VS2013 and those work fine. They just don't seem to work together.

This page has been informative about unresolved external symbol errors but ultimately unhelpful: https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix

Any ideas on what could be going wrong or where I should look? Thanks!
Last edited on
The unresolved references are not for your own code, they're for parts of the standard library, so the problem is not how you're linking your project to your DLL, but in how you're linking the project to the standard library.
Are you mixing runtime libraries? For example, Multi-threaded Debug DLL with Multi-threaded Debug?
Is it possible you removed the standard libs when you added your lib as an additional dependence?
Last edited on
Are you using a Ruby library by any chance?
@Ganado I don't believe so
@helios The run time libraries are all set to Multi-threaded Debug DLL. I also doubt I removed any standard libs.

It has come to my attention that hypot (in the first link error) is only available only in VS2015 and up. Does this mean that I have not recompiled all the libraries with VS2013 yet? If that is the case, how can I do that?
Last edited on
Topic archived. No new replies allowed.