阅读:2025回复:22
这些错误的原因会是什么??有分!
以下是我摘录的部分错误!
造成这些错误会是因为什么原因呢???还请各位赐教!谢先! pnp.c(141) : error C4013: \'PnpQueryRemoveDeviceHandler\' undefined; assuming ext rn returning int pnp.c(144) : error C4013: \'PnpSurpriseRemovalHandler\' undefined; assuming exter returning int pnp.c(147) : error C4013: \'PnpRemoveDeviceHandler\' undefined; assuming extern r turning int pnp.c(150) : error C2223: left of \'->Paused\' must point to struct/union pnp.c(151) : error C2223: left of \'->IODisabled\' must point to struct/union pnp.c(152) : error C4013: \'PnpDefaultHandler\' undefined; assuming extern return ng int pnp.c(155) : error C4013: \'PnpStopDeviceHandler\' undefined; assuming extern ret rning int pnp.c(159) : error C2223: left of \'->Paused\' must point to struct/union pnp.c(160) : error C2223: left of \'->IODisabled\' must point to struct/union pnp.c(166) : error C4013: \'UnlockDevice\' undefined; assuming extern returning i t pnp.c(180) : error C2146: syntax error : missing \';\' before identifier \'dx\' pnp.c(180) : error C2146: syntax error : missing \';\' before identifier \'fdo\' pnp.c(181) : error C2275: \'PIO_STACK_LOCATION\' : illegal use of this type as an expression |
|
|
沙发#
发布于:2002-11-21 15:10
PnpQueryRemoveDeviceHandler
PnpSurpriseRemovalHandler 等函数应该在你的PNP.C中有定义呀! |
|
|
板凳#
发布于:2002-11-21 16:10
PnpQueryRemoveDeviceHandler 对啊,我的pnp.c里面已经有这些定义了 |
|
|
地板#
发布于:2002-11-21 16:21
那把你的SOURCE贴出来看一下。
|
|
|
地下室#
发布于:2002-11-21 16:24
还有这些错误,都莫名其妙 ! :(
pnp.c(217) : error C2223: left of \'->Paused\' must point to struct/union pnp.c(218) : error C2223: left of \'->IODisabled\' must point to struct/union pnp.c(228) : error C2146: syntax error : missing \';\' before identifier \'dx\' pnp.c(228) : error C2146: syntax error : missing \';\' before identifier \'fdo\' pnp.c(232) : error C4013: \'PnpStopDevice\' undefined; assuming extern returning i nt :( |
|
|
5楼#
发布于:2002-11-21 16:27
这是我的source 文件:
TARGETNAME=gamepad TARGETTYPE=DRIVER DRIVERTYPE=WDM TARGETPATH=obj TARGETLIBS=$(DDK_LIB_PATH)\\hidclass.lib \\ $(DDK_LIB_PATH)\\ntoskrnl.lib INCLUDES=..\\inc;..\\..\\inc SOURCES=gamepad.c \\ pnp.c \\ deviceio.c \\ hid.c \\ dispatch.c \\ debugprint.c \\ gamepad.rc |
|
|
6楼#
发布于:2002-11-21 16:28
pnp.c(217) : error C2223: left of \'->Paused\' must point to struct/union
pnp.c(218) : error C2223: left of \'->IODisabled\' must point to struct/union pnp.c(228) : error C2146: syntax error : missing \';\' before identifier \'dx\' pnp.c(228) : error C2146: syntax error : missing \';\' before identifier \'fdo\' pnp.c(232) : error C4013: \'PnpStopDevice\' undefined; assuming extern returning i 这些都是具体代码错误,你自己检查一下了。 error C2223: left of \'->Paused\' must point to struct/union ->Paused前面应是一个结构/联合。等等。 |
|
|
7楼#
发布于:2002-11-21 16:30
这是source文件: TARGETNAME=gamepad TARGETTYPE=DRIVER DRIVERTYPE=WDM TARGETPATH=obj TARGETLIBS=$(DDK_LIB_PATH)\\hidclass.lib \\ $(DDK_LIB_PATH)\\ntoskrnl.lib INCLUDES=..\\inc;..\\..\\inc SOURCES=gamepad.c \\ pnp.c \\ deviceio.c \\ hid.c \\ dispatch.c \\ debugprint.c \\ gamepad.rc |
|
|
8楼#
发布于:2002-11-21 16:34
这是我的source 文件: 改: INCLUDES=$(BASEDIR)\\inc;..\\inc;..\\..\\inc |
|
|
9楼#
发布于:2002-11-21 16:34
象dx->Paused 这种只是我在设备扩展里定义的一个标志位而已。 比如还有错误:missing \';\' before identifier \'dx\' 可是我的程序里并不存在这些错误啊? :( :( |
|
|
10楼#
发布于:2002-11-21 16:37
改后应该无错误了?
|
|
|
11楼#
发布于:2002-11-21 16:43
改后应该无错误了? :( 还是不行!!! 我已经弄了三天了 :( :( :( |
|
|
12楼#
发布于:2002-11-21 16:46
加了INCLUDES=$(BASEDIR)\\inc;
错误还是那样? |
|
|
13楼#
发布于:2002-11-21 16:47
加了INCLUDES=$(BASEDIR)\\inc; 对啊,我已经加上去了! 还是有好多的错误!! :( |
|
|
14楼#
发布于:2002-11-21 16:48
我有一次碰到过类似的情况。
是语法错误导致的,好像是struct声明时u写成了v? 记不清了,反正是敲错了一个键。:D 最郁闷的是编译器没有给出正确提示。 不知道你的问题也是类似情况? 建议仔细查查语法、拼写。 |
|
15楼#
发布于:2002-11-21 16:57
我有一次碰到过类似的情况。 我现在也只有这个建议了。要不你对照我给你的文件琢磨一下。 再不行,再说! |
|
|
16楼#
发布于:2002-11-21 17:05
我觉得是不是在引用头文件(.h)的时候有什么问题!
因为还提示有下面的错误: error C2275: \'NTSTATUS\' : illegal use of this type as an expression NTSTATUS 不是DDK 里面定义的吗? 怎么成了不合法了 ?? :( |
|
|
17楼#
发布于:2002-11-21 17:09
我觉得是不是在引用头文件(.h)的时候有什么问题! 老兄,它不是说未定义,只是用法有误呀! 你是这样用的 NTSTATUS status; 加油!在下班前搞定! |
|
|
18楼#
发布于:2002-11-21 17:10
我在gamepad.h 中如下引用NTDDK\\inc中的.h文件:
#ifdef __cplusplus extern \"C\" { #endif #include \"wdm.h\" #include \"hidclass.h\" #include \"hidusage.h\" #include \"hidpi.h\" #include \"wdmguid.h\" #ifdef __cplusplus } #endif 这不应该会有问题吧? |
|
|
19楼#
发布于:2002-11-21 17:16
我在gamepad.h 中如下引用NTDDK\\inc中的.h文件: YES!我觉得是你CODE有问题。你再检查检查! |
|
|
上一页
下一页