Sarvotham
December 7th, 2005, 08:16 AM
I have a ATL COM component (housed in a DLL) that is developed using .net. I am trying to import a MFC class derived from CObject into this dll. This MFC class has a member of type CStringData structure. Since this structure is defined in afx.h of MFC, afx.h of .net I am seeing following compiler errors.
D:\Program Files\Microsoft Visual Studio\VC98\MFC\Include\AFX.H(609) : error C2872: 'CStringData' : ambiguous symbol
could be 'D:\Program Files\Microsoft Visual Studio\VC98\MFC\Include\AFX.H(357) : CStringData'
or 'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlsimpstr.h(57) : ATL::CStringData'
D:\Program Files\Microsoft Visual Studio\VC98\MFC\Include\AFX.H(619) : error C2872: 'CStringData' : ambiguous symbol
How to avoid this error? I want it to pick CStringData definition from MFC\include\afx.h and not from the afx.h of .net
D:\Program Files\Microsoft Visual Studio\VC98\MFC\Include\AFX.H(609) : error C2872: 'CStringData' : ambiguous symbol
could be 'D:\Program Files\Microsoft Visual Studio\VC98\MFC\Include\AFX.H(357) : CStringData'
or 'C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlsimpstr.h(57) : ATL::CStringData'
D:\Program Files\Microsoft Visual Studio\VC98\MFC\Include\AFX.H(619) : error C2872: 'CStringData' : ambiguous symbol
How to avoid this error? I want it to pick CStringData definition from MFC\include\afx.h and not from the afx.h of .net