billy2004
驱动牛犊
驱动牛犊
  • 注册日期2004-07-03
  • 最后登录2005-01-13
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1286回复:2

编译USB通讯程序的问题

楼主#
更多 发布于:2004-07-16 10:56
在编译的过程中出现以下错误,哪位大虾能帮帮忙:


--------------------Configuration: atr - Win32 Debug--------------------
Compiling...
atr.cpp
d:\program files\microsoft visual studio\vc98\include\setupapi.h(514) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(514) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(514) : error C2501: 'Reserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(526) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(526) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(526) : error C2501: 'Reserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(667) : error C2146: syntax error : missing ';' before identifier 'ClassInstallReserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(667) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(667) : error C2501: 'ClassInstallReserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(680) : error C2146: syntax error : missing ';' before identifier 'ClassInstallReserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(680) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(680) : error C2501: 'ClassInstallReserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1185) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1185) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1185) : error C2501: 'Reserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1196) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1196) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1196) : error C2501: 'Reserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1211) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1211) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1211) : error C2501: 'Reserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1220) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1220) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1220) : error C2501: 'Reserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1267) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1267) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1267) : error C2501: 'Reserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1279) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1279) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1279) : error C2501: 'Reserved' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1303) : error C2146: syntax error : missing ';' before identifier 'PrivateData'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1303) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1303) : error C2501: 'PrivateData' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1361) : error C2146: syntax error : missing ';' before identifier 'Reserved'
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1361) : error C2501: 'ULONG_PTR' : missing storage-class or type specifiers
d:\program files\microsoft visual studio\vc98\include\setupapi.h(1361) : error C2501: 'Reserved' : missing storage-class or type specifiers
Error executing cl.exe.

atr.exe - 36 error(s), 0 warning(s)
我在project->setting中也设置了setupapi.lib,hid.lib文件,但是总出现这样的错误。
snowStart
驱动老牛
驱动老牛
  • 注册日期2004-04-06
  • 最后登录2011-06-02
  • 粉丝0
  • 关注0
  • 积分95分
  • 威望19点
  • 贡献值177点
  • 好评度1点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-07-16 17:07
显示说明在setupapi.h文件中有很多没定义的结构或符号,
建议你查一查他们的定义文件,包含进来即可
学习,关注,交流中... [email=fengyu@163.com]Email:snowstarth@163.com[/email] [url]http://bbs.zndev.com/?a=snowStart[/url]
netscan
驱动牛犊
驱动牛犊
  • 注册日期2002-01-15
  • 最后登录2006-05-18
  • 粉丝0
  • 关注0
  • 积分47分
  • 威望5点
  • 贡献值0点
  • 好评度4点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-07-17 15:42
把setupapi.h和setupapi.lib都添加到项目里去,而不是在settings里设路径
游客

返回顶部