Please help me with this..
I have a DLL created in Visual C++ 6.0 ( VS 6.0 ).
I am trying to use this DLL in a new wrapper application written using
Visual Studio .net 2003 (C++ - MFC).
My DLL has many methods which uses CString as arguements and return
values.
At first, I got a Link error as
error LNK2019: unresolved external symbol "__declspec(dll import)
public: static void __cdecl CTestCommon::Se tName(class
ATL::CStringT<c har,class StrTraitMFC_DLL <char,class
ATL::ChTraitsCR T<char >)"
(__imp_?SetName @CTestCommon@@S AXV?$CStringT@D V?$StrTraitMFC_ DLL@DV?$ChTrait sCRT@D@ATL@@@@@ ATL@@@Z)
referenced in function "public: void __thiscall
CWrapper2003Dlg ::OnBnClickedTe st(void)"
(?OnBnClickedTe st@CWrapper2003 Dlg@@QAEXXZ)
I found a KB article as
http://support.microsoft.com/kb/309801
As per this, i should add the following code to Stdafx.h
template class __declspec(dlli mport) CStringT<TCHAR, StrTraitMFC<TCH AR,
ChTraitsCRT<TCH AR >;
template class __declspec(dlli mport) CSimpleStringT< TCHAR>;
But even this is not solving my problem !! It s giving syntax error as
error C2059: syntax error : '<'
I dont know whether this is a silly mistake of mine.. But I am not able
to figure out any solution !!
PLease help...
Sree..