Click here to Skip to main content
15,889,736 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Porting VS2008 to VS2012

successfully built in VS2008

but I get linker error as below:

Can anyone help on this issue

Creating library ../../WIN32/dbqmsv/nt-i386/RELEASE/tdqmview.lib and object .
./../WIN32/dbqmsv/nt-i386/RELEASE/tdqmview.exp
qmsdbms.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Xbad
_alloc(void)" (?_Xbad_alloc@std@@YAXXZ) referenced in function "char * __cdecl s
td::_Allocate<char>(unsigned int,char *)" (??$_Allocate@D@std@@YAPADIPAD@Z)
qmsdbms.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Xlen
gth_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) referenced in function
"public: bool __thiscall std::basic_string<char,struct std::char_traits<char>,cl
ass std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?
$char_traits@D@std@@V?$allocator@D@2@@std@@QAE_NI_N@Z)
qmsdbms.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Xout
_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) referenced in function
"public: void __thiscall std::basic_string<char,struct std::char_traits<char>,cl
ass std::allocator<char> >::_Xran(void)const " (?_Xran@?$basic_string@DU?$char_t
raits@D@std@@V?$allocator@D@2@@std@@QBEXXZ)
qmsdbms.obj : error LNK2019: unresolved external symbol "char const * __cdecl st
d::_Syserror_map(int)" (?_Syserror_map@std@@YAPBDH@Z) referenced in function "pu
blic: virtual class std::error_condition __thiscall std::_System_error_category:
:default_error_condition(int)const " (?default_error_condition@_System_error_cat
egory@std@@UBE?AVerror_condition@2@H@Z)
qmsdbms.obj : error LNK2019: unresolved external symbol "char const * __cdecl st
d::_Winerror_map(int)" (?_Winerror_map@std@@YAPBDH@Z) referenced in function "pu
blic: virtual class std::basic_string<char,struct std::char_traits<char>,class s
td::allocator<char> > __thiscall std::_System_error_category::message(int)const
" (?message@_System_error_category@std@@UBE?AV?$basic_string@DU?$char_traits@D@s
td@@V?$allocator@D@2@@2@H@Z)
../../WIN32/dbqmsv/nt-i386/RELEASE/tdqmview.exe : fatal error LNK1120: 5 unresol
ved externals

Please let me know where i am going wrong.

Regards,
Uday
Posted
Comments
Richard MacCutchan 5-Sep-13 3:47am    
You are missing a library include in your project's linker properties.

You have a number of unresolved external references. The error points out exactly what the functions are.
 
Share this answer
 
Look at it like :
XML
qmsdbms.obj :
error LNK2019: unresolved external symbol "void __cdecl std::_Xlen
gth_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) referenced in function
"public: bool __thiscall std::basic_string<char,struct std::char_traits<char>,cl
ass std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?
$char_traits@D@std@@V?$allocator@D@2@@std@@QAE_NI_N@Z)


One at a time!

It could be with the /MT switch in the lib that you are trying to link.

As discussed here:

As predicted, one of the third-party libraries was not set to /MT in release (but it was /MTd in debug) - changing that flag made it all work[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900