MukilanP

Hi all,

I am getting the following linker errors while building the application in VS2005

MN.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new[](unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" ( _U@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z) referenced in function "public: char * __cdecl std::_DebugHeapAllocator<char>::allocate(unsigned int,void const *)" ( allocate@ $_DebugHeapAllocator@D@std@@QAAPADIPBX@Z)

MN.obj : error LNK2019: unresolved external symbol "struct std::_DebugHeapTag_t const & __cdecl std::_DebugHeapTag_func(void)" ( _DebugHeapTag_func@std@@YAABU_DebugHeapTag_t@1@XZ) referenced in function "public: char * __cdecl std::_DebugHeapAllocator<char>::allocate(unsigned int,void const *)" ( allocate@ $_DebugHeapAllocator@D@std@@QAAPADIPBX@Z)

MN.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" ( _Debug_message@std@@YAXPB_W0I@Z) referenced in function "public: void __thiscall std::_Iterator_base::_Orphan_me(void)" ( _Orphan_me@_Iterator_base@std@@QAEXXZ)

MN.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: bool __thiscall std::_Tree<class std::_Tmap_traits<int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<int>,class std::allocator<struct std::pair<int const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,0> >::const_iterator::operator==(class std::_Tree<class std::_Tmap_traits<int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<int>,class std::allocator<struct std::pair<int const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >,0> >::const_iterator const &)const " ( 8const_iterator@ $_Tree@V $_Tmap_traits@HV $basic_string@DU $char_traits@D@std@@V $allocator@D@2@@std@@U $less@H@2@V $allocator@U $pair@$$CBHV $basic_string@DU $char_traits@D@std@@V $allocator@D@2@@std@@@std@@@2@$0A@@std@@@std@@QBE_NABV012@@Z)

I set the following options

Ignore specific libary :libcmtd; libcpmtd;libc

Runtime library : Multi-threaded Debug(/MTd)

Addtional Dependicies : Prod1.lib Util.lib ws2_32.lib odbc32.lib odbccp32.lib

Where Prod1 is built with run time library as Multi-threaded (/MT). It is third party library.

Util.lib is built with run time library as Multi-threaded Debug (/MTd).

Can anybody please tell the solution for solving this errors

Regards,

Mukilan



Re: Visual C++ General Getting Linker Error while porting to VS2005

TilakGopi

Hi,

See the post : http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1316510&SiteID=1 in the same page.It'll help u out.

Thanx,

Ch.T.Gopi Kumar.






Re: Visual C++ General Getting Linker Error while porting to VS2005

MukilanP

Hi Gopi,

In the mentioned link, they are suggesting to recreate the projects. There is no other way to solve that issue . Because i have to recreate lot of projects if i followe that.

Regards,

Mukilan





Re: Visual C++ General Getting Linker Error while porting to VS2005

Bite Qiu - MSFT

/MTd option implys using static CRT(debug version of course), that is libcmtd.lib, which has been ignored in your project settings. Try to remove libcmtd and libcpmtd in the ignor list, see if it helps.

Usually you don't need to specify explicity which library should be ignored untill you have confidence and it is necessary.