usb setupapi.h(37) : error
来源:互联网 发布:淘宝扣分12分会怎么样 编辑:程序博客网 时间:2024/04/30 12:02
usb开发,网上教程各种错,
e:\vc98\include\setupapi.h(37) : error C2143: syntax error : missing ';' before '*'
e:\vc98\include\setupapi.h(37) : error C2501: 'LPGUID' : missing storage-class or type specifiers
e:\vc98\include\commctrl.h(26) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
e:\vc98\include\commctrl.h(26) : fatal error C1004: unexpected end of file found
e:\vc98\include\setupapi.h(37) : error C2501: 'LPGUID' : missing storage-class or type specifiers
e:\vc98\include\commctrl.h(26) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
e:\vc98\include\commctrl.h(26) : fatal error C1004: unexpected end of file found
最终简单的改一下
#include <setupapi.h>
#include <stdio.h>
#include <setupapi.h>
#include <stdio.h>
改成这样就可以了:
#include <windows.h>
#include <setupapi.h>
#include <stdio.h>
看来如果进行win32编译,前提是必须引进 windows.h 这个头文件。
过程编译出错
usb_test2.obj : error LNK2001: unresolved external symbol "unsigned char __stdcall HidD_GetAttributes(void *,struct _HIDD_ATTRIBUTES *)" (?HidD_GetAttributes@@YGEPAXPAU_HIDD_ATTRIBUTES@@@Z)
usb_test2.obj : error LNK2001: unresolved external symbol "void __stdcall HidD_GetHidGuid(struct _GUID *)" (?HidD_GetHidGuid@@YGXPAU_GUID@@@Z)
Debug/usb_test2.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
修改如下:
extern "C"{ //加上extern C
#include <hidsdi.h>
#include <setupapi.h>
#include <hidsdi.h>
}
0 0
- usb setupapi.h(37) : error
- setupapi.h(37) : error
- setupapi + USB + GUID
- setupapi.h和setupapi.lib該如何使用
- setupapi.h和setupapi.lib該如何使用
- SetupAPI 结合注册表获取 USB优盘序列号
- 用SetupAPI结合注册表获取USB优盘序列号
- error.h
- 一个可以禁用USB存储设备的程序(SetupAPI的使用方法)
- 一个可以禁用USB存储设备的程序(SetupAPI的使用方法)
- /include/linux/usb.h
- SetupApi.pas
- fatal error LNK1181: 无法打开输入文件“hid.lib setupapi.lib
- keil USB communication error
- error:#include"Point.h";
- 错误报告error.h
- error: mcrypt.h
- SetupAPI.dll和DeviceIoControl
- Android入门1 ——系统介绍与框架
- hadoop常见问题及其解决办法
- 基于canvas绘图应用程序图标框架的建立
- 新浪分享授权登录
- android studio 代码快捷键
- usb setupapi.h(37) : error
- dispatch_once浅谈
- iOS开发中的4种数据持久化方式
- 查看某个端口的连接数
- Java I/O流
- makefile速成记录
- TreeMap类源码解析
- Hbase--1 简介
- 谁将成为中国版底特律?