阅读:1246回复:2
usb的程序错误
我最近下载了一个USB的源程序,运行后给出如下的错误:Build Log
--------------------Configuration: basicusb - Win32 Checked-------------------- Command Lines Creating command line \"rc.exe /l 0x409 /fo\"Checked/basicusb.res\" /i \"C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\include\" /d \"_DEBUG\" /d NTVERSION=\'WDM\' \"E:\\zz\\基本的USB\\basicusb.rc\"\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(CPU)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(CPU)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" Creating temporary file \"D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP17.tmp\" with contents [ /nologo /Gz /MLd /W3 /Z7 /Oi /Gy /I \"\\inc\\ddk\\wdm\" /I \"\\inc\\ddk\" /I \"\\inc\" /I \"\\inc\\win98\" /I \"\\\\\" /I \".\" /I \"C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\include\" /I \"C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\source\" /I \"\\src\\usb\\inc\" /I \"\\src\\wdm\\usb\\inc\" /I \"C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\include\\dep_vxd\" /D WIN32=100 /D \"_DEBUG\" /D \"_WINDOWS\" /D \"STD_CALL\" /D CONDITION_HANDLING=1 /D NT_UP=1 /D NT_INST=0 /D _NT1X_=100 /D WINNT=1 /D _WIN32_WINNT=0x0400 /D WIN32_LEAN_AND_MEAN=1 /D DBG=1 /D DEVL=1 /D FPO=0 /D \"NDEBUG\" /D _DLL=1 /D _X86_=1 /D NTVERSION=\'WDM\' /Fp\"Checked/basicusb.pch\" /YX /Fo\"Checked/\" /Fd\"Checked/\" /FD /Zel -cbstring /QIfdiv- /QIf /GF /c \"E:\\zz\\基本的USB\\basicusb.cpp\" \"E:\\zz\\基本的USB\\busbdev.cpp\" ] Creating command line \"cl.exe @D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP17.tmp\" warning: unresolved Environment Variable \"$(CPU)\" warning: unresolved Environment Variable \"$(BASEDIR)\" warning: unresolved Environment Variable \"$(BASEDIR)\" Creating temporary file \"D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP18.tmp\" with contents [ wdm.lib \"C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\lib\\\\checked\\vdw_wdm.lib\" usbd.lib /nologo /base:\"0x10000\" /version:4.0 /entry:\"DriverEntry\" /pdb:none /debug /debugtype:both /machine:IX86 /nodefaultlib /out:\".\\i386\\checked\\basicusb.sys\" /libpath:\"\\libchk\\i386\" /libpath:\"\\lib\\i386\\checked\" /driver /debug:notmapped,FULL /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096 /MERGE:_PAGE=PAGE /MERGE:_TEXT=.text /SECTION:INIT,d /MERGE:.rdata=.text /FULLBUILD /RELEASE /FORCE:MULTIPLE /OPT:REF /OPTIDATA /align:0x20 /osversion:4.00 /subsystem:native \".\\Checked\\basicusb.obj\" \".\\Checked\\busbdev.obj\" \".\\Checked\\basicusb.res\" ] Creating command line \"link.exe @D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP18.tmp\" Creating temporary file \"D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP19.bat\" with contents [ @echo off C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\bin\\nmsym /trans:source,package,always .\\i386\\checked\\basicusb.sys ] Creating command line \"D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP19.bat\" Compiling resources... Compiling... basicusb.cpp C:\\NTDDK\\INC\\wdm.h(354) : error C2146: syntax error : missing \';\' before identifier \'Lock\' C:\\NTDDK\\INC\\wdm.h(354) : error C2501: \'PULONG_PTR\' : missing storage-class or type specifiers C:\\NTDDK\\INC\\wdm.h(354) : error C2501: \'Lock\' : missing storage-class or type specifiers C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\include\\kdriver.h(961) : fatal error C1903: unable to recover from previous error(s); stopping compilation busbdev.cpp C:\\NTDDK\\INC\\wdm.h(354) : error C2146: syntax error : missing \';\' before identifier \'Lock\' C:\\NTDDK\\INC\\wdm.h(354) : error C2501: \'PULONG_PTR\' : missing storage-class or type specifiers C:\\NTDDK\\INC\\wdm.h(354) : error C2501: \'Lock\' : missing storage-class or type specifiers C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\include\\kpnpdev.h(547) : fatal error C1903: unable to recover from previous error(s); stopping compilation Error executing cl.exe. Output Window Results basicusb.sys - 8 error(s), 0 warning(s) 请问我该怎么改??? 象这句: C:\\NTDDK\\INC\\wdm.h(354) : error C2146: syntax error : missing \';\' before identifier \'Lock\' 我查了一下觉得根本没错呀,怎么提示少了一个;呢 这是怎么回事呀?? |
|
沙发#
发布于:2002-10-31 09:55
1. 没有装platform sdk
2. 没有用ddk的环境变量 3. 路径里面有中文字符,在9x下有时候会出问题 |
|
|
板凳#
发布于:2002-10-31 10:00
我是在WIN2K下,所以不存在第三个问题,
那我在哪里能下载到SDK呀, 还有那个环境变量该怎么设置呀 谢谢 哦,对了,我是直接在VC下用的BUILD, 但是我以前应该设置过DDK的INCLUDE,LIB等路径呀 那个环境变量该怎么设呀 |
|