Mysterious linker errors (LNK2019 + LNK2001) not present in VC6



Converting an standard mfc-app (which compiles without error in VC++ 6.0) yields some mysterious linker errors in VS.Net (7.1). I have to include two SAP-libs (cause my app calls an sap-rfc-module) which seem to be the source of the linker troubles. The linker messages state:
Unresolved external - __declspec(dllimport) bool __cdecl std::blush:perator==(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>> const &,char const *)" (__imp_??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z)', verwiesen in Funktion '"private: void __thiscall CRfcGetFunctionInterface::ConstructParameters(void)" (?ConstructParameters@CRfcGetFunctionInterface@@AAEXXZ)


Unresolved external - __declspec(dllimport) private: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>>::_Tidy(bool)" (__imp_?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z)

Do I need updated lib-files? Do I have to include some other lib(s)

Any help welcome...

Carl Daniel [VC++ MVP]

ColdMountain said:
Do I need updated lib-files? Do I have to include some other lib(s)?

That's likely the case. VC6's STL and VC7{.1}'s STL are not binary
compatible. If you have libraries that were made for VC6 you can't in
general use them with VC7{.1}. (There are some cases that will work, but it
sounds like you're encountering the much more common case that doesn't


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question