阅读:6454回复:2
VS2005 + XP SP2 + WinXP DDK build 2600+ DriverStudio 3.2 编写驱动程序,出现了如下问题:
我先编译库:VdwLibs2005.sln,
出现了如下问题: ------ 已启动全部重新生成: 项目: VdwLibs, 配置: NT4 Free Win32 ------ 正在删除项目“VdwLibs”(配置“NT4 Free|Win32”)的中间文件和输出文件 正在编译... suballoc.cpp stcinit.cpp kstlphs.cpp kstlnphs.cpp kstllmcb.cpp kstl.cpp util.cpp kwmistr.cpp kwmi.cpp kvxdintf.cpp kustring.cpp kusb.cpp kunitnam.cpp ktrace.cpp ktimer.cpp ksysthrd.cpp Kstrmdrv.cpp Kstream.cpp Kstradpt.cpp kstdwmi.cpp 正在生成代码... 正在编译... kspin.cpp ksfifo.cpp ksemaphr.cpp kresreq.cpp kregkey.cpp kquery.cpp kpnplow.cpp kpnpdev.cpp kphysdev.cpp kpcicfg.cpp kmutex.cpp klower.cpp klist.cpp kirp.cpp kintrupt.cpp khidaux.cpp kfile.cpp kfifo.cpp kexception.cpp kevent.cpp 正在生成代码... 正在编译... kerrlog.cpp kdmqex.cpp kdmqcsq.cpp kdmaxfer.cpp kdevque.cpp kdevice.cpp kchecker.cpp kbus.cpp kaddress.cpp kadapter.cpp K1394Isoc.cpp k1394Async.cpp k1394.cpp getnames.cpp dwcontrl.cpp cpprt.cpp 正在生成代码... 正在创建库... kwmistr.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kwmi.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kvxdintf.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kusb.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 Kstrmdrv.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 Kstream.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 Kstradpt.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kstdwmi.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kpnplow.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kpnpdev.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kphysdev.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kbus.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 K1394Isoc.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 k1394Async.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 k1394.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 dwcontrl.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 Build Environment Variables BASEDIR=D:\WINDDK\2600 生成日志保存在“file://c:\Program Files\Compuware\DriverStudio\DriverWorks\source\obj\i386\nt4free\BuildLog.htm” VdwLibs - 0 个错误,16 个警告 ------ 已启动全部重新生成: 项目: VdwLibs, 配置: NT4 Checked Win32 ------ 正在删除项目“VdwLibs”(配置“NT4 Checked|Win32”)的中间文件和输出文件 正在编译... suballoc.cpp stcinit.cpp kstlphs.cpp kstlnphs.cpp kstllmcb.cpp kstl.cpp util.cpp kwmistr.cpp kwmi.cpp kvxdintf.cpp kustring.cpp kusb.cpp kunitnam.cpp ktrace.cpp ktimer.cpp ksysthrd.cpp Kstrmdrv.cpp Kstream.cpp Kstradpt.cpp kstdwmi.cpp 正在生成代码... 正在编译... kspin.cpp ksfifo.cpp ksemaphr.cpp kresreq.cpp kregkey.cpp kquery.cpp kpnplow.cpp kpnpdev.cpp kphysdev.cpp kpcicfg.cpp kmutex.cpp klower.cpp klist.cpp kirp.cpp kintrupt.cpp khidaux.cpp kfile.cpp kfifo.cpp kexception.cpp kevent.cpp 正在生成代码... 正在编译... kerrlog.cpp kdmqex.cpp kdmqcsq.cpp kdmaxfer.cpp kdevque.cpp kdevice.cpp kchecker.cpp kbus.cpp kaddress.cpp kadapter.cpp K1394Isoc.cpp k1394Async.cpp k1394.cpp getnames.cpp dwcontrl.cpp cpprt.cpp 正在生成代码... 正在创建库... kwmistr.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kwmi.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kvxdintf.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kusb.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 Kstrmdrv.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 Kstream.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 Kstradpt.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kstdwmi.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kpnplow.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kpnpdev.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kphysdev.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 kbus.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 K1394Isoc.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 k1394Async.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 k1394.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 dwcontrl.obj : warning LNK4221: 未找到公共符号;存档成员将不可访问 Build Environment Variables BASEDIR=D:\WINDDK\2600 生成日志保存在“file://c:\Program Files\Compuware\DriverStudio\DriverWorks\source\obj\i386\nt4checked\BuildLog.htm” VdwLibs - 0 个错误,16 个警告 ------ 已启动全部重新生成: 项目: VdwLibs, 配置: WDM Free Win32 ------ 正在删除项目“VdwLibs”(配置“WDM Free|Win32”)的中间文件和输出文件 正在编译... suballoc.cpp stcinit.cpp kstlphs.cpp kstlnphs.cpp kstllmcb.cpp kstl.cpp util.cpp kwmistr.cpp kwmi.cpp kvxdintf.cpp kustring.cpp kusb.cpp kunitnam.cpp ktrace.cpp ktimer.cpp ksysthrd.cpp Kstrmdrv.cpp Kstream.cpp Kstradpt.cpp kstdwmi.cpp 正在生成代码... 正在编译... kspin.cpp KsMiniDriver.cpp ksfifo.cpp ksemaphr.cpp kresreq.cpp kregkey.cpp kquery.cpp kpnplow.cpp kpnpdev.cpp kphysdev.cpp kpcicfg.cpp kmutex.cpp klower.cpp klist.cpp kirp.cpp kintrupt.cpp khidaux.cpp kfile.cpp kfifo.cpp kexception.cpp 正在生成代码... 正在编译... kevent.cpp kerrlog.cpp kdmqex.cpp kdmqcsq.cpp kdmaxfer.cpp kdevque.cpp kdevice.cpp kchecker.cpp kbus.cpp kaddress.cpp kadapter.cpp K1394Isoc.cpp k1394Async.cpp k1394.cpp getnames.cpp dwcontrl.cpp cpprt.cpp 正在生成代码... 正在创建库... Build Environment Variables BASEDIR=D:\WINDDK\2600 生成日志保存在“file://c:\Program Files\Compuware\DriverStudio\DriverWorks\source\obj\i386\wdmfree\BuildLog.htm” VdwLibs - 0 个错误,0 个警告 ------ 已启动全部重新生成: 项目: VdwLibs, 配置: WDM Checked Win32 ------ 正在删除项目“VdwLibs”(配置“WDM Checked|Win32”)的中间文件和输出文件 正在编译... suballoc.cpp stcinit.cpp kstlphs.cpp kstlnphs.cpp kstllmcb.cpp kstl.cpp util.cpp kwmistr.cpp kwmi.cpp kvxdintf.cpp kustring.cpp kusb.cpp kunitnam.cpp ktrace.cpp ktimer.cpp ksysthrd.cpp Kstrmdrv.cpp Kstream.cpp Kstradpt.cpp kstdwmi.cpp 正在生成代码... 正在编译... kspin.cpp KsMiniDriver.cpp ksfifo.cpp ksemaphr.cpp kresreq.cpp kregkey.cpp kquery.cpp kpnplow.cpp kpnpdev.cpp kphysdev.cpp kpcicfg.cpp kmutex.cpp klower.cpp klist.cpp kirp.cpp kintrupt.cpp khidaux.cpp kfile.cpp kfifo.cpp kexception.cpp 正在生成代码... 正在编译... kevent.cpp kerrlog.cpp kdmqex.cpp kdmqcsq.cpp kdmaxfer.cpp kdevque.cpp kdevice.cpp kchecker.cpp kbus.cpp kaddress.cpp kadapter.cpp K1394Isoc.cpp k1394Async.cpp k1394.cpp getnames.cpp dwcontrl.cpp cpprt.cpp 正在生成代码... 正在创建库... Build Environment Variables BASEDIR=D:\WINDDK\2600 生成日志保存在 file://c:\Program Files\Compuware\DriverStudio\DriverWorks\source\obj\i386\wdmchecked\BuildLog.htm VdwLibs - 0 个错误,0 个警告 ========== 全部重新生成: 4 已成功, 0 已失败, 0 已跳过 ========== -----------------------------------------------------------------------------------------------------是怎么回事? 然后,编译工程文件,出现了如下问题: 注释了TARGETLIBS=$(DDK_LIB_PATH)\ntstrsafe.lib $(DDK_LIB_PATH)\csq.lib 的情况下的编译信息: D:\WDM\sample\Driver>call D:\WINDDK\2600\bin\setenv.bat D:\WINDDK\2600 chk D:\WDM\sample\driver>build.exe -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 d:\wdm\sample\driver directory for files to compile. d:\wdm\sample\driver BUILD: Compiling d:\wdm\sample\driver directory Compiling - sample.rc for i386 Compiling - sampledriver.cpp for i386 Compiling - sampledevice.cpp for i386 Compiling - samplequeue.cpp for i386 BUILD: Linking d:\wdm\sample\driver directory Linking Executable - objchk\i386\sample.sys for i386 sampledriver.obj() : error LNK2019: unresolved external symbol " public: __thiscall KRegistryKey::KRegistryKey (enum __registryRoot, unsigned short const *,unsigned char, unsigned long, unsigned long,unsigned long)" (??0KRegistryKey@@QAE@W4__registryRoot@@PBGEKKK@Z) referenced in function _DriverEntry@8 sampledriver.obj() : error LNK2019: unresolved external symbol "public: static void * __cdecl KDevice::operator new(unsigned int,unsigned short const *,unsigned long,unsigned short const *,unsigned long,unsigned long)" (??2KDevice@@SAPAXIPBGK0KK@Z) referenced in function "public: virtual long __thiscall sampleDriver::AddDevice(struct _DEVICE_OBJECT *)" (?AddDevice@sampleDriver@@UAEJPAU_DEVICE_OBJECT@@@Z) vdw_wdm.lib(kdevice.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) vdw_wdm.lib(kpnpdev.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) vdw_wdm.lib(kdmqcsq.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) objchk\i386\sample.sys() : error LNK1120: 3 unresolved externals BUILD: Done 7 files compiled 1 executable built - 6 Errors 没有注释TARGETLIBS=$(DDK_LIB_PATH)\ntstrsafe.lib $(DDK_LIB_PATH)\csq.lib 的情况下的编译信息: D:\WDM\mysample\Driver>call D:\WINDDK\2600\bin\setenv.bat D:\WINDDK\2600 chk D:\WDM\mysample\driver>build.exe -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 d:\wdm\mysample\driver directory for files to compile. d:\wdm\mysample\driver BUILD: Compiling d:\wdm\mysample\driver directory Compiling - mysample.rc for i386 Compiling - mysampledriver.cpp for i386 Compiling - mysampledevice.cpp for i386 Compiling - mysamplequeue.cpp for i386 BUILD: Linking d:\wdm\mysample\driver directory NMAKE : U1073: don't know how to make 'D:\WINDDK\2600\lib\wxp\i386\ntstrsafe.lib' BUILD: nmake.exe failed - rc = 2BUILD: Done 7 files compiled - 1 Error ---------------------------------------两种方式均没有生成.sys文件,这又是怎么回事????? 请指教。谢谢!! |
|
沙发#
发布于:2008-02-22 22:40
这个问题我遇到过,引起这个问题的有2个原因,1、VS没有正确的安装,再2005下面用ds321必需下载一个IDE集成补丁,修复ds321在VS2005中的集成。2、在直接使用BUILD来建立的时候会问你到底是用哪个LIB来链接,vs2005中也有和DDK中名称相同的库,但是版本却有区别,另外还有中情况,LIBVIEW还是使用了自己的一些头文件和库文件这些在DDK的环境中没有被设置所以必需加入之。
我在VS2005试用DS321没有任何问题,简单点把IDE的集成补丁下回来一切OK。 |
|
板凳#
发布于:2008-03-25 17:37
我用的也是vs2005,但编译ds321的lib总过不去,补丁也打了,环境变量也弄了,就是不行,希望大家能帮我看下
多谢~ 我在批编译里只编译了一个,其他3个也同样错误,都是环境变量没找到 在tools-options-driverstudio-search paths 里面src path和symbol path都是空的,这个需要设置么,请问该怎么设置啊? 具体错误如下: ------ Using F:\WINDDK\2600 DDK ------ 已启动生成: 项目: NdisWdm, 配置: Checked Win32 ------ 正在编译... util.cpp kustring.cpp kusb.cpp ktimer.cpp ksysthrd.cpp kspin.cpp ksemaphr.cpp kpnplow.cpp kmutex.cpp klower.cpp kirp.cpp kexception.cpp kevent.cpp K1394Isoc.cpp K1394Isoc.cpp(807) : warning C4291: 'void *operator new(size_t,POOL_TYPE)' : no matching operator delete found; memory will not be freed if initialization throws an exception D:\Program Files\Compuware\DriverStudio\DriverNetworks\include\kndiscpp.h(25) : see declaration of 'operator new' K1394Isoc.cpp(857) : warning C4291: 'void *operator new(size_t,POOL_TYPE)' : no matching operator delete found; memory will not be freed if initialization throws an exception D:\Program Files\Compuware\DriverStudio\DriverNetworks\include\kndiscpp.h(25) : see declaration of 'operator new' K1394Isoc.cpp(902) : warning C4291: 'void *operator new(size_t,POOL_TYPE)' : no matching operator delete found; memory will not be freed if initialization throws an exception D:\Program Files\Compuware\DriverStudio\DriverNetworks\include\kndiscpp.h(25) : see declaration of 'operator new' k1394Async.cpp k1394.cpp Generating Code... 正在创建库... 正在创建浏览信息文件... Microsoft ?????????? Version 8.00.50727 Copyright (C) Microsoft Corporation. All rights reserved. Build Environment Variables Project : error PRJ0019: 工具从"Build Environment Variables" 生成日志保存在“file://d:\Program Files\Compuware\DriverStudio\DriverWorks\source\obj\i386\kndiswdmchecked\BuildLog.htm” NdisWdm - 1 个错误,3 个警告 ========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ========== |
|
|