Archived

This topic is now archived and is closed to further replies.

Extrawurst

vc++6-code to vc++7-code = error

Recommended Posts

i just compiled a program that i was able to compile under vc++6 without any problem, but under vc++7 i get some "unresolved external symbols"-linker errors. and they mean some "std::_Xran()"-stuff i dont understand! whats wrong with it ? here the complete error-message: --------------------------------------------- application_c.obj : error LNK2019: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@std@@YAXXZ) referenced in function "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::assign(class std::basic_string,class std::allocator > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z) ---------------------------------------------

Share this post


Link to post
Share on other sites
Have you cleaned your project before rebuilding?


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
Unless you give us a code snippet (like 5-10 lines) that generates the same error, no, we can''t help you.

The error message means that the following function is busted.
std::string& std::string::assign( std::string const&, unsigned int, unsigned int )


[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]

Share this post


Link to post
Share on other sites
-what do you mean with cleaning up?

-and actually i dont know what exactly makes the error, i mean and linker error is not easy to find, in a big application like that wich complete runs on the older compiler(vc++6)

Share this post


Link to post
Share on other sites
quote:
Original post by Extrawurst
-what do you mean with cleaning up?


By selecting "clean". This deletes files created during the compilation process.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
Yep, that''s probably the ticket. There are loads of internal functions (especially in the STL) that often change between compiler versions. Chances are, some of your object files are built using the older versions. I have to do this all the time when I upgrade to a newer version of GCC.

Share this post


Link to post
Share on other sites