Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unresolved Symbol LNK error 2019

Status
Not open for further replies.

stevef56

Technical User
Nov 19, 2005
4
US
I am getting unresolved linker errors after porting VC++6.0 code to VC.net. Any suggestions??

Stevef56
 
What symbols is this being reported on?
 
Hear are a few,

I am trying to port USBHIDIO a host example from Jan Axelsons web page at lvr.com. I createded a directory for the project and added the two usb header files that were recommened (hid.lib, hid.h, and hidsdi.h.)

stevef56

usbhidioc error LNK2019: unresolved external symbol _HidD_GetAttributes@8 referenced in function "protected: bool __thiscall CUsbhidiocDlg::FindTheHID(void)" (?FindTheHID@CUsbhidiocDlg@@IAE_NXZ)
usbhidioc error LNK2019: unresolved external symbol _HidD_GetHidGuid@4 referenced in function "protected: bool __thiscall CUsbhidiocDlg::FindTheHID(void)" (?FindTheHID@CUsbhidiocDlg@@IAE_NXZ)
usbhidioc error LNK2019: unresolved external symbol _HidD_FreePreparsedData@4 referenced in function "protected: void __thiscall CUsbhidiocDlg::GetDeviceCapabilities(void)" (?GetDeviceCapabilities@CUsbhidiocDlg@@IAEXXZ)
usbhidioc error LNK2019: unresolved external symbol _HidP_GetCaps@8 referenced in function "protected: void __thiscall CUsbhidiocDlg::GetDeviceCapabilities(void)" (?GetDeviceCapabilities@CUsbhidiocDlg@@IAEXXZ)
usbhidioc error LNK2019: unresolved external symbol _HidD_GetPreparsedData@8 referenced in function "protected: void __thiscall CUsbhidiocDlg::GetDeviceCapabilities(void)" (?GetDeviceCapabilities@CUsbhidiocDlg@@IAEXXZ)
 
stevef56 said:
I createded a directory for the project and added the two usb header files that were recommened (hid.lib, hid.h, and hidsdi.h.)
Just the headers? That might explain the link errors; you need the library routines as well.
 
You probably need to add hid.lib to the link input.
 
Just got back to this. Actually I do have the libraries in the work directory and added them to the linker dependencies. Still no luck though!
 
You probably need to declare them as C functions
Code:
extern "C" {
#include "hid.h"
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top