VC++编译错误error C2065: “HANDLE”: 未声明的标识符及添加winbase.h后提示winbase.h(243): error C2146: 语法错误: 缺少“;”(在标识符“Internal”的前面)的解决办法
问题描述:
VC++程序编译时提示错误:error C2065: “HANDLE”: 未声明的标识符等众多错误提示,如下所示:
error C2065: “HANDLE”: 未声明的标识符
error C2146: 语法错误: 缺少“;”(在标识符“hFind”的前面)
error C2065: “hFind”: 未声明的标识符
error C2065: “INVALID_HANDLE_VALUE”: 未声明的标识符
error C2065: “WIN32_FIND_DATA”: 未声明的标识符
error C2146: 语法错误: 缺少“;”(在标识符“fdata”的前面)
error C2065: “fdata”: 未声明的标识符
error C2065: “hFind”: 未声明的标识符
error C2065: “fdata”: 未声明的标识符
error C3861: “FindFirstFile”: 找不到标识符
error C2065: “hFind”: 未声明的标识符
error C2065: “INVALID_HANDLE_VALUE”: 未声明的标识符
error C2065: “fdata”: 未声明的标识符
error C2228: “.cFileName”的左边必须有类/结构/联合
查找了一下所对应的头文件为winbase.h,自然就添加上去了:
#include <winbase.h>
但是当添加winbase.h后又提示winbase.h(243): error C2146: 语法错误: 缺少“;”(在标识符“Internal”的前面)等众多错误提示,如下所示:
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“Internal”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“InternalHigh”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“Offset”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“OffsetHigh”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“Pointer”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“hEvent”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“lpCompletionKey”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“Internal”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“dwNumberOfBytesTransferred”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“nLength”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C2146: 语法错误: 缺少“;”(在标识符“lpSecurityDescriptor”的前面)
>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
解决办法:
将#include <winbase.h>替换成#include<windows.h>就行了。
#include<windows.h>
VC++编译错误error C2065: “HANDLE”: 未声明的标识符及添加winbase.h后提示winbase.h(243): error C2146: 语法错误: 缺少“;”(在标识符“Internal”的前面)的解决办法的更多相关文章
- error C2065:未声明的标识符错误
原文地址:http://blog.sina.com.cn/s/blog_8216ada701017evx.html 在VS2010下进行VC++调试时,出现这样一种错误:error C2065:未声明 ...
- 引用其他头文件时出现这种错误,莫名其妙,error C2065: “ColorMatrix”: 未声明的标识符
今天做项目时,直接拷贝了另一个工程里的头文件和源文件,然后运行时就出现这种问题,莫名其妙,在原程序里运行一点问题就没有,但是在新工程里就是error. >e:\c++\button_fly2\b ...
- error C2065: “SHCNE_DELETE”: 未声明的标识符
转自VC错误:http://www.vcerror.com/?p=1383 问题描述: 编译时出现: error C2065: "SHCNE_DELETE": 未声明的标识符 er ...
- error C2065: “CDatabase”: 未声明的标识符
使用vc++与access的接口时出现错误“error C2065: “CDatabase”: 未声明的标识符” 解决方法: 添加 #include "afxdb.h"
- error C2065: “IDD_DIALOG1” : 未声明的标识符
编译时提示error C2065: “IDD_DIALOG1” : 未声明的标识符 错误的可能原因及解决方法如下: 1.出错文件中没有包含资源文件ID声明的resource.h文件.在出错文件中加入# ...
- MFC error C2065: “IDD_DIALOG1” : 未声明的标识符 转载
error C2065: “IDD_DIALOG1” : 未声明的标识符 1.编译时提示error C2065: “IDD_DIALOG1” : 未声明的标识符 2.错误的可能原因及解决方法如下: 原 ...
- error C2065: “CString”: 未声明的标识符 ;fatal error C1189: #error : afxstr.h can only be used in MFC proje
转自VC错误:http://www.vcerror.com/?p=1388 问题描述: error C2065: "CString": 未声明的标识符 fatal error C1 ...
- error C2065: “SHELLEXECUTEINFO”: 未声明的标识符
转自VC错误:http://www.vcerror.com/?p=1385 问题描述: error C2065: "SHELLEXECUTEINFO": 未声明的标识符 解决方法: ...
- 错误 1 error C2065: “IDC_LISTBOX”: 未声明的标识符
错误的可能原因及解决方法如下:1.出错文件中没有包含资源文件ID声明的resource.h文件.在出错文件中加入#include “resource.h”语句. 2.工程附件包含目录的路径下没有res ...
随机推荐
- 从实例角度分析java的public、protected、private和default访问权限
一.public 同一个package 1.本类内部 public class A { public int f=1; public void m1() {} public void m2() { f ...
- (转发)一个通用的C++ 消息总线框架
注:转自https://www.cnblogs.com/qicosmos/archive/2013/04/28/3048919.html 应用开发过程中经常会处理对象间通信的问题,一般都是对象或接口的 ...
- Hadoop Mapreduce 参数 (二)
MergeManagerImpl 类 内存参数计算 maxInMemCopyUse 位于构造函数中 final float maxInMemCopyUse = jobConf.getFloat(MRJ ...
- 100行代码实现现代版Router
原文:http://www.html-js.com/article/JavaScript-version-100-lines-of-code-to-achieve-a-modern-version ...
- 【代码笔记】iOS-MBProgressHUD
一,工程图. 二,代码. AppDelegate.h #import <UIKit/UIKit.h> #import "MBProgressHUD.h" @interf ...
- Mac配置SDK+JDK环境
1.打开默认终端设备,编辑.bash_profile文件,命令:vi .bash_profile 2.执行,打开文件,编辑,配置环境命令如下: ①JDK环境:export JAVA_HOME=/lib ...
- mysql 安全模式
今天,执行一条delete语句的时候报错如下: Error Code: 1175. You are using safe update mode and you tried to update a t ...
- 使用 Roslyn引擎动态编译代码
Roslyn引擎自2014年开源至今这么久,一直没怎么了解过,虽然VS2015早就集成了它. 以前老一套的动态编译方法在 .NET Core中似乎不再支持了,很多方法都是未实现的.下面就介绍如何在.N ...
- Vue组件学习
根据Vue官方文档学习的笔记 在学习vue时,组件学习比较吃力,尤其是组件间的通信,所以总结一下,官方文档的组件部分. 注册组件 全局组件 语法如下,组件模板需要使用一个根标签包裹起来.data必须是 ...
- python的类基础
python类的基础: 1,面向对象的基本概念 类(Class): 用来描述具有相同的属性和方法的对象的集合.它定义了该集合中每个对象所共有的属性和方法.对象是类的实例. 类变量:类变量在整个实例化的 ...