Conversion to Visual C++ .Net and LNK2001 / LNK2019

Hi,

I have just installed Visual C++ .NET 2003 Standard. I have two projects
that were developed on Visual C++ 6.0, both of which compiled and ran. Note that I have NOT uninstalled Visual C++ 6.0 (in case that may be related to the problem), nor do I plan to do so. However, on Visual C++ . NET, I get the following linker errors:

Project 1:
error LNK2001: unresolved external symbol "public: static strcut
CRuntimeClass const CObject::class
CObject"(?classCObject@CObject@@2UCRuntimeClass@@B)

( I'm guessing the error above has something to do with my usage of the
RUNTIME_CLASS macro, but this worked before)


Project 2:

error LNK2019: unresolved external symbol "__declspec(dllimport) void
__cdecl std::_Xlen(void)" (__imp_?_Xlen@std@@YAXXZ) referenced in function
"public: class std::basic_string,class std::allocator > &
__thiscall std::basic_string,class std::allocator >::append(unsigned char const
*,unsigned int)"
(?append@?$basic_string@EU?$char_traits@E@std@@V?$allocator@E@2@@std@@QAEAAV
12@PBEI@Z)

error LNK2019: unresolved external symbol "__declspec(dllimport) void
__cdecl std::_Xran(void)" (__imp_?_Xran@std@@YAXXZ) referenced in function
"public: class std::basic_string,class std::allocator > &
__thiscall std::basic_string,class std::allocator >::erase(unsigned int,unsigned
int)"
(?erase@?$basic_string@EU?$char_traits@E@std@@V?$allocator@E@2@@std@@QAEAAV1
2@II@Z)

( I'm guessing the errors above have to do with my use of the STL class
string, but again, this was not a problem in Visual C++ 6.0)

Does anyone have any suggestions on how I can fix these problems?

Thanks,
Silvio

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories