阅读:1623回复:9
hellowdm编译不过去,请问应该怎么办?
我按照
http://www.nethovel.com/documents/docview.asp?ID=2334 做的 可是在xp ddk下编译不过,哪位是xp帮我看一下,好吗? 多多感谢!! 我已经打包在附件里面了 |
|
|
沙发#
发布于:2003-07-24 04:00
是那些错 ??
|
|
板凳#
发布于:2003-07-24 10:28
F:\\samples\\hellowdm>build
BUILD: Object root set to: ==> objchk BUILD: Adding /Y to COPYCMD so xcopy ops won\'t hang. BUILD: /i switch ignored BUILD: Compile and Link for i386 BUILD: Loading C:\\WINDDK\\2600\\build.dat... BUILD: Computing Include file dependencies: BUILD: Examining f:\\samples\\hellowdm directory for files to compile. f:\\samples\\hellowdm - 1 source files (0 lines) BUILD: Saving C:\\WINDDK\\2600\\build.dat... BUILD: Compiling f:\\samples\\hellowdm directory Compiling - hellowdm.c for i386 hellowdm.c(59) : error C2275: \'PDEVICE_EXTENSION\' : illegal use of this type as an expression hellowdm.h(28) : error see declaration of \'PDEVICE_EXTENSION\' hellowdm.c(59) : error C2146: syntax error : missing \';\' before identifier \'dx\' hellowdm.c(59) : error C2144: syntax error : \'<Unknown>\' should be preceded by \' <Unknown>\' hellowdm.c(59) : error C2144: syntax error : \'<Unknown>\' should be preceded by \' <Unknown>\' hellowdm.c(59) : error C2143: syntax error : missing \';\' before \'identifier\' hellowdm.c(59) : error C2065: \'dx\' : undeclared identifier hellowdm.c(59) : error C4047: \'=\' : \'int\' differs in levels of indirection from \'PDEVICE_EXTENSION\' hellowdm.c(60) : error C2223: left of \'->fdo\' must point to struct/union hellowdm.c(63) : error C2223: left of \'->NextStackDevice\' must point to struct/u nion hellowdm.c(92) : error C2275: \'NTSTATUS\' : illegal use of this type as an expres sion c:\\winddk\\2600\\inc\\ddk\\wxp\\ntdef.h(557) : error see declaration of \'NTSTATUS\' hellowdm.c(92) : error C2146: syntax error : missing \';\' before identifier \'stat us\' hellowdm.c(92) : error C2144: syntax error : \'<Unknown>\' should be preceded by \' <Unknown>\' hellowdm.c(92) : error C2144: syntax error : \'<Unknown>\' should be preceded by \' <Unknown>\' hellowdm.c(92) : error C2143: syntax error : missing \';\' before \'identifier\' hellowdm.c(92) : error C2065: \'status\' : undeclared identifier BUILD: Compile errors: not linking f:\\samples\\hellowdm directory BUILD: Done 2 files compiled - 17 Errors |
|
地板#
发布于:2003-07-24 11:57
Did you run setenv.bat befor you run build.exe ??
|
|
地下室#
发布于:2003-07-24 12:13
运行了啊
我从开始菜单的ddk->build environment->checked运行了一次,除了这个错误 运行了setenv.bat一次,进入dos下build也出了这个提示。 这些错误的关键是第一条: hellowdm.c(59) : error C2275: \'PDEVICE_EXTENSION\' : illegal use of this type as an expression 请问是什么意思? 哪位能把附件下载了试一下,非常感谢!! |
|
5楼#
发布于:2003-07-24 13:12
先统一定义变量,才能使用,不要边使用边声明。全部放在子程序开始。
|
|
6楼#
发布于:2003-07-24 13:18
在hellowdm.c的59行。
PDEVICE_EXTENSION dx = (PDEVICE_EXTENSION)fdo->DeviceExtension; 注意是C语法,不是C++语法。 如楼上所说。 |
|
7楼#
发布于:2003-07-24 14:05
非常感谢大家
我改了,现在只有两个错误了,附件里面有我改完的 F:\\samples\\hellowdm>build -ceZ BUILD: Object root set to: ==> objchk BUILD: Adding /Y to COPYCMD so xcopy ops won\'t hang. BUILD: /i switch ignored BUILD: Compile and Link for i386 BUILD: Examining f:\\samples\\hellowdm directory for files to compile. BUILD: Compiling f:\\samples\\hellowdm directory Compiling - hellowdm.c for i386 BUILD: Linking f:\\samples\\hellowdm directory NMAKE : U1073: don\'t know how to make \'C:\\WINDDK\\2600\\lib\\i386\\free\\usbd.lib\' BUILD: nmake.exe failed - rc = 2 BUILD: Done 2 files compiled - 1 Error |
|
|
8楼#
发布于:2003-07-24 14:12
感谢大家!
这个搞定啦!! 大家真是很热心啊!希望大家多多帮助我这个新手 是不是也象csdn一样给分啊?我第一次来,不知道怎么给分 //blush |
|
9楼#
发布于:2003-07-24 14:28
全部编译完成了?恭喜!以后要注意你的sources文件,里面写的不太严格。
|
|