Click here to Skip to main content
15,941,690 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Updated 16-May-11 23:47pm
v2

Make sure you include usbdlib.h and if building in visual studio (i.e not manually through cmd)check that the configuration is good.
 
Share this answer
 
Comments
markfilan 17-May-11 21:53pm    
i didn;t use VS ,I used DDK command line buid the driver.anyway thanks for help.
Kurt Degiorgio 18-May-11 1:13am    
did you include usbdlib.h?
markfilan 18-May-11 1:41am    
yeah.
markfilan 18-May-11 1:45am    
yeah.and now i use VS2008 to compile the driver , i got the error is :no target architecture. do u know how to solve this one?
Kurt Degiorgio 19-May-11 6:44am    
well your configuration of the VS is probably bad, i suggest you try to compile it manually using the DDK build environments depending on which architecture your targeting (i.e if you are going to use this driver on a windows server 2003 x86 use the respective environment).
In command line you need to specify Usbd.lib as Linker input.
I guess this will resolve your problem.
 
Share this answer
 
Comments
markfilan 17-May-11 21:52pm    
you mean use VS to build is better ?
Debojyoti Majumder 18-May-11 0:45am    
Yes.
markfilan 18-May-11 1:40am    
i looked resource file ,and i added the usbd.lib.so ,it'not this problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900