Click here to Skip to main content
11,634,634 members (66,664 online)
Rate this: bad
good
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 0:31am
Edited 30-Dec-10 0:36am
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 at 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 at 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 at 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)

  Print Answers RSS
0 OriginalGriff 8,736
1 Sergey Alexandrovich Kryukov 8,359
2 Mika Wendelius 6,845
3 F-ES Sitecore 2,354
4 Suvendu Shekhar Giri 2,205


Advertise | Privacy | Mobile
Web01 | 2.8.150728.1 | Last Updated 30 Dec 2010
Copyright © CodeProject, 1999-2015
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