2014-02-07 146 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

相關問題