- Joined
- Dec 1, 2005
- Messages
- 2
- Reaction score
- 0
I am trying to port some VC++6 code to VC++7 (VS2003), & met the following compilation error when compiling my old code in .NET:
error 2371:'CString': redefinition; different basic types
in c:\program files\microsoft visual studio .net 2003\vc7\atlmfc\include\afxstr.h
After some time on the Web, I found out that CString in VC++7 has been declared as a template class (thus breaking legacy code using CString written in VC++6). In afxstr.h, there's this statement which does this:
typedef ATL::CStringT<TCHAR, StrTraitMFC<TCHAR>> CString;
Apparently my legacy code has used some VC++6 DLL which has defined CString the 'old' way, & the compiler is complaining when it sees the redefinition of CString in the new afxstr.h.
Can some one help here? Where is the file which contains the old definition of CString? Getting desperate!! TIA!
error 2371:'CString': redefinition; different basic types
in c:\program files\microsoft visual studio .net 2003\vc7\atlmfc\include\afxstr.h
After some time on the Web, I found out that CString in VC++7 has been declared as a template class (thus breaking legacy code using CString written in VC++6). In afxstr.h, there's this statement which does this:
typedef ATL::CStringT<TCHAR, StrTraitMFC<TCHAR>> CString;
Apparently my legacy code has used some VC++6 DLL which has defined CString the 'old' way, & the compiler is complaining when it sees the redefinition of CString in the new afxstr.h.
Can some one help here? Where is the file which contains the old definition of CString? Getting desperate!! TIA!