It was a dark and rainy night.. I was trying to do something useful.. what I don't remember right now.. But I was getting this weird problem...
Error 1 error C2872: 'CPoint' : ambiguous symbol atltypes.h
Error 2 error C2872: 'CRect' : ambiguous symbol atltypes.h
Error 3 error C2872: 'CSize' : ambiguous symbol atltypes.h
.
.
Error N error C2872: 'CReality' : ambiguous symbol life.h
Error 2 error C2872: 'CRect' : ambiguous symbol atltypes.h
Error 3 error C2872: 'CSize' : ambiguous symbol atltypes.h
.
.
Error N error C2872: 'CReality' : ambiguous symbol life.h
Obviously (is it?) I was using ATL and WTL to do something... After scratching my head, googling and going through few WTL headers .. I found the solution. Just include the following, just after you add the #include <windows.h> :
#include <atlbase.h> #if (_ATL_VER >= 0x0700) #include <atlstr.h> #include <atltypes.h> #endif #if (_ATL_VER >= 0x0700) #define _WTL_NO_CSTRING #define _WTL_NO_WTYPES #define _WTL_NO_UNION_CLASSES #endif #include <atlapp.h>