I have a third party DLL (lib, includes, dll, no source) that references
CString in both return codes and function arguments. At link time, I receive
errors because the declaration of CString has changed.
There is no way I can change the DLL, so my only idea is that I need to
create a temporary VC++ 6.0 CString. My error lists the VC++ 2008 CString
definition (since it isn't found in the DLL) but I can't think of a way to
get the VC++ 6.0 revision of CString.
For example, from the include, I have:
CString GetLastError();
Which is causing a link error:
App_FSI_Comm.obj : error LNK2028: unresolved token (0A000901) "public: class
ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> >
__thiscall CSabreComm::GetLastError(void)"
(?GetLastError@CSabreComm@@$$FQAE?AV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@XZ)
referenced in function __catch$?UpdateFlightList@CApp_FSI_Comm@@$$FIAE_N_N@Z$0
I found:
http://social.microsoft.com/Forums/en-US/vcgeneral/thread/ade8cf7a-b1e1-4853-ac37-d4b48a0b90ae
but short of making another DLL (which I'm not sure would function since
I'll still have the link errors), the solutions didn't work.
Any ideas greatly appreciated. Intuiting the VC++ 6.0 CString would
probably be the best.
1. You have source code
2. The DLL is a COM DLL, or is otherwise carefully designed to use a
compiler-independent interface.
As it is, you will either have to stick with VC6 for your whole application, or
compiler-independent interface.