阅读:1435回复:5
求助高手___为什么加了#include \"hid.h\"出现错误??
小弟由于想在microsoft的directx下的存取hid的方法,,在一简单的程序下加一个 :#include \"hid.h\"后为什么回出现怎么多的问题!
d:\\code\\md\\setupapi.h(684) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(684) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(684) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(696) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(696) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(696) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(840) : error C2146: syntax error : missing \';\' before identifier \'ClassInstallReserved\' d:\\code\\md\\setupapi.h(840) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(840) : error C2501: \'ClassInstallReserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(853) : error C2146: syntax error : missing \';\' before identifier \'ClassInstallReserved\' d:\\code\\md\\setupapi.h(853) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(853) : error C2501: \'ClassInstallReserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1370) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(1370) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1370) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1381) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(1381) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1381) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1396) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(1396) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1396) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1405) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(1405) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1405) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1452) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(1452) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1452) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1464) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(1464) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1464) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1488) : error C2146: syntax error : missing \';\' before identifier \'PrivateData\' d:\\code\\md\\setupapi.h(1488) : error C2501: \'DWORD_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1488) : error C2501: \'PrivateData\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1596) : error C2146: syntax error : missing \';\' before identifier \'Reserved\' d:\\code\\md\\setupapi.h(1596) : error C2501: \'ULONG_PTR\' : missing storage-class or type specifiers d:\\code\\md\\setupapi.h(1596) : error C2501: \'Reserved\' : missing storage-class or type specifiers d:\\code\\md\\hid.h(52) : warning C4005: \'ASSERT\' : macro redefinition d:\\program files\\microsoft visual studio\\vc98\\mfc\\include\\afx.h(226) : see previous definition of \'ASSERT\' Error executing cl.exe. Creating browse info file... :(请高手回答下!! |
|
沙发#
发布于:2005-06-09 16:51
把DDK的hid.h考进来。
|
|
|
板凳#
发布于:2005-06-09 17:29
考进去没有用!!
|
|
地板#
发布于:2005-06-09 17:45
大家可以也试一下,,随便在那里加个这样的头文件就可以试市!!
|
|
地下室#
发布于:2005-06-12 19:10
我遇到过的在VC->工程->设置->links加入setupapi.lib即可
************************************************* 给点分吧 ************************************************* |
|
|
5楼#
发布于:2005-06-18 19:24
Re:求助高手___为什么加了#include \"hid.h\"出现错误??
不好意思,,,我这里好象还是不行,,,而且我是把setupapi.lib已经考到了我的当前的目录下! |
|