vs2010新建立的mfc工程编译就出错error C2065: “DWORD_PTR”: 未声明的标识符
下面是报错内容:>stdafx.cpp1>1>NOTE:WINVERhasbeendefinedas0x0500orgreaterwhichenables1>Window...
下面是报错内容:
> 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: 语法错误:“)” 展开
> 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: 语法错误:“)” 展开
2个回答
展开全部
#define DWORD_PTR (DWORD *)
追问
这个方法我用过了,不行。我电脑上同时还安装了vc6.0 ,很可能他们混在一起了,现在我全部卸载掉,重新安装2010,不知道可不可以。
追答
不会用C#了吧,C#里面是木有指针的。看一下吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
直接装个VS2013试试,应该是某些MFC的文件或者是DLL冲突了。
更多追问追答
追问
我卸载了vc6.0和卸载重新安装了vs2010还是不行啊。
追答
你是什么操作系统?怎么连一些MFC常用的函数名都找不到了?
你看看是不是在stdafx.h里有定义Windows的版本?像下面这种。
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
// Change these values to use different versions
#define WINVER 0x0500
#define _WIN32_WINNT 0x0501
#define _WIN32_IE 0x0501
#define _RICHEDIT_VER 0x0200
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询