c2061 dword 语法错误_vs2010新建立的mfc工程编译就出错error C2065: “DWORD_PTR”: 未声明的标识符...

本文档详细记录了一次遇到的Visual Studio 10编译错误,涉及WinVER宏定义问题,包括如何识别错误原因(未声明的DWORD_PTR和LONG_PTR标识符)、解决步骤(设置WINVER或检查零售版SDK)以及SDK相关提示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下面是报错内容:

> stdafx.cpp

1>

1> NOTE: WINVER has been defined as 0x0500 or greater which enables

1> Windows NT 5.0 and Windows 98 features. When these headers were released,

1> Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.

1>

1> For this release when WINVER is defined as 0x0500 or greater, you can only

1> build beta or test applications. To build a retail application,

1> set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk

1> to see if retail Windows NT 5.0 or Windows 98 headers are available.

1>

1> See the SDK release notes for more information.

1>

1>d:\microsoft visual studio 10.0\vc\atlmfc\include\afxv_w32.h(204): error C2065: “DWORD_PTR”: 未声明的标识符

1>d:\microsoft visual studio 10.0\vc\atlmfc\include\afxv_w32.h(204): error C2143: 语法错误 : 缺少“;”(在“GetWindowThreadProcessId”的前面)

1>d:\microsoft visual studio 10.0\vc\atlmfc\include\atlconv.h(91): error C2061: 语法错误: 标识符“LONG_PTR”

定为 int。注意: C++ 不支持默认 int

1>d:\microsoft visual studio 10.0\vc\atlmfc\include\atldebugapi.h(34): error C2146: 语法错误: 缺少“)”(在标识符“dwProcess”的前面)

忽略数据上的修饰符

1>d:\microsoft visual studio 10.0\vc\atlmfc\include\atldebugapi.h(35): error C2182: “AtlTraceSnapshotProcess”: 非法使用“void”类型

1>d:\microsoft visual studio 10.0\vc\atlmfc\include\atldebugapi.h(35): error C2059: 语法错误:“)”

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值