编译USBKBD,总是报错
dispatch.obj() : error LNK2019: unresolved external symbol __imp__USBD_GetUSBDIVersion@4 referenced in function "long __stdcall UsbKbdCreate(struct _DEVICE_OBJECT *,struct _IRP *)" (?UsbKbdCreate@@YGJPAU_DEVICE_OBJECT@@PAU_IRP@@@Z)
usb.obj() : error LNK2019: unresolved external symbol __imp__USBD_CreateConfigurationRequestEx@8 referenced in function "long __stdcall UsbSelectConfiguration(struct _USBKBD_DEVICE_EXTENSION *)" (?UsbSelectConfiguration@@YGJPAU_USBKBD_DEVICE_EXTENSI
ON@@@Z)
usb.obj() : error LNK2019: unresolved external symbol __imp__USBD_ParseConfigurationDescriptorEx@28 referenced in function "long __stdcall UsbSelectConfiguration(struct _USBKBD_DEVICE_EXTENSION *)" (?UsbSelectConfiguration@@YGJPAU_USBKBD_DEVICE_EXTE
NSION@@@Z)
objchk/i386/usbkbd.sys() : error LNK1120: 3 unresolved externals
发现网上也有很多人遇到这问题只要在SOURCES加入
TARGETLIBS=$(BASEDIR)/lib/wxp/i386/usbd.lib(我是XPDDK,其实只要是usbd.lib路径)
就可以了!