winnt.h的错误解决办法

    技术2025-06-03  93

    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",并且最好是放在第一个。***

    最新回复(0)