T
Tommy Vercetti
I'm trying to upgrade a large MFC C++ application to Managed C++.
I get a strange link error (at end of message). It appears to be
duplicate STL string symbols between the MFC DLL and one of my classes.
I've commented the class file down to a minimalist stub file. It should
compile/link but won't run correctly. I still get this strange error. I
can't really pare this down much more for testing purposes. Any ideas?
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: class
std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
already defined in DomainDataMgr.obj
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: unsigned int
__thiscall std::basic_string<wchar_t,struct
already defined in DomainDataMgr.obj
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "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> >(class
std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
std::allocator<wchar_t> > const &)"
(??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@@Z)
already defined in DomainDataMgr.obj
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: unsigned int
__thiscall std::basic_string<wchar_t,struct
already defined in DomainDataMgr.obj
I get a strange link error (at end of message). It appears to be
duplicate STL string symbols between the MFC DLL and one of my classes.
I've commented the class file down to a minimalist stub file. It should
compile/link but won't run correctly. I still get this strange error. I
can't really pare this down much more for testing purposes. Any ideas?
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: class
std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
(?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@II@Z)std::allocator said:::erase(unsigned int,unsigned int)"
already defined in DomainDataMgr.obj
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: unsigned int
__thiscall std::basic_string<wchar_t,struct
(?size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ)std::char_traits said:::size(void)const "
already defined in DomainDataMgr.obj
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "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> >(class
std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
std::allocator<wchar_t> > const &)"
(??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@@Z)
already defined in DomainDataMgr.obj
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: unsigned int
__thiscall std::basic_string<wchar_t,struct
(?max_size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ)std::char_traits said:::max_size(void)const "
already defined in DomainDataMgr.obj