阅读:3071回复:2
VS2005 + XP SP2 + Win2003 DDK build 3790+ DriverStudio 3.2 编写驱动程序,出现了如下问题:
[h5]F:\vs\first\driver>build.exe -ceZ
BUILD: Adding /Y to COPYCMD so xcopy ops won't hang. BUILD: Using 2 child processes BUILD: Object root set to: ==> objchk_wxp_x86 BUILD: Compile and Link for i386 BUILD: Examining f:\vs\first\driver directory for files to compile. f:\vs\first\driver BUILD: Compiling (NoSync) f:\vs\first\driver directory 1>Compiling - first.rc for i386 1>Compiling - firstdriver.cpp for i386 1>Compiling - firstdevice.cpp for i386 1>Compiling - generating code... for i386 BUILD: Compiling f:\vs\first\driver directory BUILD: Linking f:\vs\first\driver directory 1>Linking Executable - objchk_wxp_x86\i386\first.sys for i386 1>errors in directory f:\vs\first\driver 1>firstdriver.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 1>firstdriver.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 firstDriver::AddDevice(struct _DEVICE_OBJECT *)" (?AddDevice@firstDriver@@UAEJPAU_DEVICE_OBJECT@@@Z) 1>vdw_wdm.lib(kdevice.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) 1>vdw_wdm.lib(kpnpdev.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) 1>objchk_wxp_x 86\i386\first.sys : error LNK1120: 3 unresolved externals BUILD: Done 4 files compiled 1 executable built - 5 Errors WINDDK\3790.1830\bin\setenv.bat[/h5] 小弟DS补丁 VS2005 SP1补丁已全打。求大虾指点。。 |
|
沙发#
发布于:2008-07-12 21:32
有cpp原文件没有包含进来,或者某些库没有包含进来,导致 link 链接时某些类的成员函数找不到。
|
|
|
板凳#
发布于:2008-07-14 16:27
多谢楼上,我昨天分析了。的确找不到函数的。不用向导,自己写的驱动能通过。
应该是DriverStudio 3.2 的原文件有问题,已发现数处。正在查找修改。 |
|