C ++:WIN7驱动程序中的错误 [英] C++: Errors in WIN7 driver

查看:87
本文介绍了C ++:WIN7驱动程序中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



构建基于32位计算机和64位计算机编写的驱动程序时.我遇到了这些错误:

c:\winddk\driver\dispatch.obj : error LNK2001: unresolved external symbol __im p_USBD_GetUSBDIVersion

c:\winddk\driver\usb.obj : error LNK2001: unresolved external symbol __imp_USB D_ParseConfigurationDescriptorEx

c:\winddk\driver\usb.obj : error LNK2001: unresolved external symbol __imp_USB D_CreateConfigurationRequestEx

c:\winddk\driver\objchk_win7_amd64\amd64\usbcalc.sys : error LNK1120: 3 unresolved externals


这很奇怪,因为我使用DDK构建环境而不是VS2008,所以任何人都可以向我指出正确的解决方法.

是不是因为这些功能不能在WIN7 OS中使用? cmd)检查配置是否正确.


在命令行中,您需要指定Usbd.lib作为链接器输入.
我想这可以解决您的问题.


Hi,

When I build the driver which I wrote based on 32bit computers and on 64bit computers. I came across these errors:

c:\winddk\driver\dispatch.obj : error LNK2001: unresolved external symbol __im p_USBD_GetUSBDIVersion

c:\winddk\driver\usb.obj : error LNK2001: unresolved external symbol __imp_USB D_ParseConfigurationDescriptorEx

c:\winddk\driver\usb.obj : error LNK2001: unresolved external symbol __imp_USB D_CreateConfigurationRequestEx

c:\winddk\driver\objchk_win7_amd64\amd64\usbcalc.sys : error LNK1120: 3 unresolved externals


It''s strange because I used DDK build environment instead of VS2008, so can anyone point me in the right direction on how to fix this.

Is it because the functions can''t be used in WIN7 OS?

解决方案

Make sure you include usbdlib.h and if building in visual studio (i.e not manually through cmd)check that the configuration is good.


In command line you need to specify Usbd.lib as Linker input.
I guess this will resolve your problem.


这篇关于C ++:WIN7驱动程序中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆