winnt.h的錯誤解決辦法

winnt.h(236) : error C2146

編譯項目時出現如下錯誤:
 1>Stdafx.cpp 1>c:/program files/microsoft sdks/windows/v6.0a/include/winnt.h(236) : error C2146: 語法錯誤 : 缺少“;”(在標識符“PVOID64”的前面)
1>c:/program files/microsoft sdks/windows/v6.0a/include/winnt.h(236) : error C4430: 缺少類型說明符 - 假定爲 int。注意: C++ 不支持默認 int
1>c:/program files/microsoft sdks/windows/v6.0a/include/winnt.h(7818) : error C2146: 語法錯誤 : 缺少“;”(在標識符“Buffer”的前面)
1>c:/program files/microsoft sdks/windows/v6.0a/include/winnt.h(7818) : error C4430: 缺少類型說明符 - 假定爲 int。注意: C++ 不支持默認 int
1>c:/program files/microsoft sdks/windows/v6.0a/include/winnt.h(7818) : error C4430: 缺少類型說明符 - 假定爲 int。注意: C++ 不支持默認 int

查找後發現問題出在vc包含目錄順序問題.
調整DXSDK/Inclue到最後面,問題解決.
參考:http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/51043152-3ab6-4a9e-b3c1-2dba8300d9bb/

 

***MFC的工程中,任意一個cpp文件都需要包含#include "stdafx.h",並且最好是放在第一個。***

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章