2014-02-07 666 views
0

我已经在64位Windows 7安装了Visual Studio 2012,并试图建立MFC项目,但在第一次调试总是出现错误:C++ Visual Studio 2012错误C3861:'_T':找不到标识符?

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宏已被定义?为什么出现这些问题?

+1

您只需#包括 goGud

+0

这里你的意思是把#包括如果错误出现在头文件...? – tonni

+0

将它包含在头文件中。 – goGud

回答

3

#include <tchar.h>应该工作。如果不是,那就试着去做;

#ifdef _UNICODE 
#define _T(x)  L ## x 
#else /* _UNICODE */ 
#define _T(x)  x 
#endif /* _UNICODE */ 
+0

我给你投了努力,但没有一个在我的确切例子中工作 – tonni

+0

你能分享你的代码的一部分,你有这个错误信息。如果您提供更多信息,那么我们可能会明白为什么会出现错误。 – goGud

+0

那么所有其他的错误是相同的张贴,问题出现在默认的c + +头(这是在任何编译开始之前处理),所以我在Visual Studio层搜索解决方案,我应该再次安装它来修复插入头插入在一个标题那些你的代码... – tonni

相关问题