Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am developing an application for interfacing a USB device. When I compile my code I get the following errors. I had included "hidsdi.h" and "hid.lib" is downloaded and pasted in the local directory.

error LNK2019: unresolved external symbol _HidD_GetAttributes@8 referenced in function _main
error LNK2019: unresolved external symbol _HidD_GetHidGuid@4 referenced in function _connectToUSBDevice


Can anyone help me with this bug.

Regards
Mohan
Posted
Updated 30-Dec-10 0:36am
v2

1 solution

Pasting the hid.lib file in the local directory is not enough. You need to add the hid.lib to the link input.
 
Share this answer
 
Comments
Mohanraj Sam 30-Dec-10 6:47am    
Hi,
Thanks for ur reply. I am new to MS Visual Studio 2008 can you say where i have to go to add the hid.lib for link input

Regards
Mohan
JF2015 30-Dec-10 7:08am    
try:

Just go to project properties -> Configuration properties -> Linker.
Goto to ->General and set the "Additional Library directories" to point to your lib file directory.

Then goto to Linker -> Input and type in your lib file name e.g. hid.lib in the "Additional Dependencies" field
Espen Harlinn 15-Jan-11 10:49am    
5+ Good answer

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