我在64位Windows 7上安装了visual studio 2012,并尝试构建MFC项目,但在第一次调试时总是出现错误:
Error 1 error C3861: '_T': identifier not found c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atlexcept.h 66
Error 3 error C3861: '_T': identifier not found c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atlcomcli.h 556
Error 4 error C3861: '_T': identifier not found c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\atlcomcli.h 589
...
哪些_T宏必须定义?为什么会出现这些问题?
答案 0 :(得分:3)
#include <tchar.h>
应该有效。如果不是..然后尝试这样做;
#ifdef _UNICODE
#define _T(x) L ## x
#else /* _UNICODE */
#define _T(x) x
#endif /* _UNICODE */