Click here to Skip to main content
12,761,046 members (31,454 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C
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 30-Dec-10 1:31am
Updated 30-Dec-10 1:36am
Slacker007102.8K
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Pasting the hid.lib file in the local directory is not enough. You need to add the hid.lib to the link input.
  Permalink  
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)



Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 30 Dec 2010
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100