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 ...
随机推荐
- Inviting Friends(hdu3244 && zoj3187)完全背包+二分
Inviting Friends Time Limit: 1 Second Memory Limit: 32768 KB You want to hold a birthday party, invi ...
- vue + element ui 实现实现动态渲染表格
前言:之前需要做一个页面,能够通过表名动态渲染出不同的表格,这里记录一下.转载请注明出处:https://www.cnblogs.com/yuxiaole/p/9786326.html 网站地址:我的 ...
- python匿名函数lambda与switch的实现
1,lambda的语法跟es6的箭头函数差不多 >>> show=lambda x,y: x * y >>> show( 10, 20 ) 200 2,递归求阶乘 ...
- 【奇技淫巧】绕过waf写文件
今天偶然利用此命令干成了大事,老司机一看就懂命令用法百度搜到的,希望对各位表哥有用echo 48 65 6C 6C 6F 2C 57 6F 72 6C 64 21 >hex.txt::生成 he ...
- HDU2859(KB12-Q DP)
Phalanx Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Su ...
- 本地服务器搭建服务:svn
SVN(使用VisualSVN-server)可视化SVN 服务搭建,适合小白:简单又快捷,深入了解命令行方式等高手请移步官网看教程 1.官网 :http://subversion.apache.or ...
- Zookeeper简单初应用
一.Zookeeper 1.1 概述 Zookeeper是一个开源的分布式的,为分布式应用提供协调服务的Apache项目. Zookeeper从设计模式角度来理解:是一个基于观察者模式设计的分布式服务 ...
- 获取windows鼠标的当前坐标
#先下载pyautogui库,pip install pyautogui import os,time import pyautogui as pag try: while True: print ( ...
- [iOS] UICollectionView初始化滚动到中间的bug
转载请保留地址wossoneri.com 问题 首先看一下我之前写的demo:link demo是封装了一个控件,直接在MainViewController的viewWillAppear里初始化,并且 ...
- centos安装pip3
安装pip3 1:安装依赖 yum install openssl-devel -y yum install zlib-devel -y 2:安装setuptools wget --no-check- ...