Share via

Building projects with older libraries

James Bloom-Scheff 1 Reputation point
2022-06-08T17:01:35.137+00:00

I am trying to build an old project, last build with visual studio 2003. I've upgraded the project and source code to visual studio 2019. Everything compiles. I am getting a lot of undefined globals from the stl. The project that I am building uses a lot of libraries which were probably built with visual studio 2003 and there appear to be some stl incompatibilites.

Is there any way that this can work, or do I need to rebuild those libraries with visual studio 2019? I haven't been able to locate the source code for those libraries so rebuilding them isn't really an option.

1>WinTCP.lib(connmgr.obj) : error LNK2001: unresolved external symbol "public: __thiscall bad_cast::bad_cast(class bad_cast const &)" (??0bad_cast@@QAE@ABV0@@Z)
1>WinTCP.lib(connmgr.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall bad_cast::~bad_cast(void)" (??1bad_cast@@UAE @XZ)
1>WinTCP.lib(connmgr.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ) referenced in function "class std::num_put<char,class std::ostreambuf_iterator<char,struct std::char_traits<char> > > const & __cdecl std::use_facet<class std::num_put<char,class std::ostreambuf_iterator<char,struct std::char_traits<char> > > >(class std::locale const &)" (??$use_facet@V?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@0@ABVlocale@0@@Z)
1>WinTCP.lib(connmgr.obj) : error LNK2019: unresolved external symbol "public: __thiscall bad_cast::bad_cast(char const *)" (??0bad_cast@@QAE@PBD@Z) referenced in function "class std::num_put<char,class std::ostreambuf_iterator<char,struct std::char_traits<char> > > const & __cdecl std::use_facet<class std::num_put<char,class std::ostreambuf_iterator<char,struct std::char_traits<char> > > >(class std::locale const &)" (??$use_facet@V?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@0@ABVlocale@0@@Z)
1>WinTCP.lib(connmgr.obj) : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z) referenced in function __unwindfunclet$?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z$0
1>WinTCP.lib(connmgr.obj) : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z) referenced in function "public: static unsigned int __cdecl std::num_put<char,class std::ostreambuf_iterator<char,struct std::char_traits<char> > >::_Getcat(class std::locale::facet const * *)" (?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z)
1>WinTCP.lib(connmgr.obj) : error LNK2001: unresolved external symbol "struct std::_DebugHeapTag_t const std::_DebugHeapTag" (?_DebugHeapTag@std@@3U_DebugHeapTag_t@1@B)

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.


1 answer

Sort by: Most helpful
  1. James Bloom-Scheff 1 Reputation point
    2022-06-09T13:15:02.95+00:00

    yes, I am building x86 debug and all libraries have been added.

    As I said in the original post, my project is including libraries that have not been built since visual studio 2003. There appears to be a mismatch between the stl used in those libraries and the stl used by vs2019. I think I need to rebuild those libraries, but the source code is gone, so that's not an option.

    I'm just trying to find out if there is any way that I can get this working without rebuilding those libraries.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.