阅读:2082回复:14
环境变量设置问题
我在BUILD时出现了如下的错误提示:
The following environment variables were not found $(CPU) $(BASEDIR) 这个环境变量怎么设置呀,我已经修改了AUTOEXEC文件呀,其他该设的地方我也设了呀 |
|
沙发#
发布于:2002-11-05 13:30
使用DDK里的Debug窗口或者Release窗口,不要用你自己的DOS窗
|
|
|
板凳#
发布于:2002-11-05 14:43
修改我的电脑里的属性,高级,环境变量可以不?
|
|
地板#
发布于:2002-11-05 14:47
修改我的电脑里的属性,高级,环境变量可以不? 理论上可以,但要设好多东西。 给分,给分 |
|
|
地下室#
发布于:2002-11-05 15:13
哎呀,那怎么在DDK下设呀,说了我就给你分
怎样, |
|
5楼#
发布于:2002-11-05 21:46
用的是DS吗?好像在安装DS时,系统自动修改Autoexec.bat文件,里面有两项与之相关。
|
|
6楼#
发布于:2002-11-06 08:28
是呀,我用的DS,可是他怎么没有修改呢,哪两项是修改的呀
我这个问题应该是没有修改环境变量引起的吧?Command Lines 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\\RSPAF.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\\RSPAF.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\\RSPB0.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\\RSPB0.tmp\" Creating temporary file \"D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSPB1.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\\RSPB1.bat\" 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 帮我看一看拉,谢谢 |
|
7楼#
发布于:2002-11-06 08:36
使用DS需要运行他附带的工具SetDDKGo设置DDK的Build环境。
|
|
|
8楼#
发布于:2002-11-06 10:00
哎呀,那怎么在DDK下设呀,说了我就给你分 你装完DDK,在开始菜单里DDK里就有一个工具叫什么调试环境,点它,出来一个DOS窗口,是DDK给你设好的,你直接用就行了 |
|
|
9楼#
发布于:2002-11-06 11:38
在VC的IDE界面里,正确安装完DS后菜单栏会多出一项DriverStudio,下面的Driver Build Setting中直接设,
工具栏也有相应按钮 |
|
|
10楼#
发布于:2002-11-06 11:46
brucezh:
那我的CPU和BASEDIR怎么设呀,其他都好的,编译时就是它俩没有设置? 它们该怎么设呀,谢了 |
|
11楼#
发布于:2002-11-06 11:52
brucezh: 用的是2。5版吧,我现在用2。6,跟原来不太一样了。 不过我记得,2。5也是装完后在VC的集成开发环境中有菜单项和按钮的,CPU好像是选I386,basedir选定DDK所在的路径。 很简单阿,搜索一下,以前这种帖子好多 |
|
|
12楼#
发布于:2002-11-06 12:47
thanks a lot
|
|
13楼#
发布于:2002-11-06 13:35
我设置了,在编译时但是又遇到了这样的问题,Command Lines
Creating temporary file \"D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP4.tmp\" with contents [ wdm.lib \"C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\lib\\i386\\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:\"c:\\NTDDK\\libchk\\i386\" /libpath:\"c:\\NTDDK\\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\\RSP4.tmp\" Creating temporary file \"D:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\RSP5.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\\RSP5.bat\" Linking... LINK : fatal error LNK1181: cannot open input file \"C:\\PROGRA~1\\NuMega\\DRIVER~1\\DRIVER~3\\lib\\i386\\checked\\vdw_wdm.lib\" Error executing link.exe. Output Window 确实,我查看了一下,那个目录里根本没有vdw_wdm.lib文件,这是怎么回事呀,帮帮忙拉 |
|
14楼#
发布于:2002-11-06 19:44
由于ds所使用的类库是对DDK函数的封装,还必须在VC下编译Numega\\driverworks\\source\\vdwlibs.dsw,创建相应的库文件(选择菜单build->BatchBuild->Build,与NT有关的不选),试试!!
|
|