阅读:1286回复:2
编译USB通讯程序的问题
在编译的过程中出现以下错误,哪位大虾能帮帮忙:
--------------------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文件,但是总出现这样的错误。 |
|
沙发#
发布于:2004-07-16 17:07
显示说明在setupapi.h文件中有很多没定义的结构或符号,
建议你查一查他们的定义文件,包含进来即可 |
|
|
板凳#
发布于:2004-07-17 15:42
把setupapi.h和setupapi.lib都添加到项目里去,而不是在settings里设路径
|
|