Hi, I am Anil, I am working with application that send data from pc to an HID device.

I am working with application that send data from pc to an HID device in VC ++ 6.0 . In that specific program I am getting fllowing errors when I tried to build it.

--Configuration: usbhidiocDlg - Win32 Debug--
Compiling...
usbhidiocDlg.cpp
usbhidioc.cpp
STDAFX.CPP
Linking...
usbhidiocDlg.obj : error LNK2001: unresolved external symbol __imp__SetupDiDestroyDeviceInfoList@4
usbhidiocDlg.obj : error LNK2001: unresolved external symbol _HidD_GetAttributes@8
usbhidiocDlg.obj : error LNK2001: unresolved external symbol __imp__SetupDiGetDeviceInterfaceDetailA@24
usbhidiocDlg.obj : error LNK2001: unresolved external symbol __imp__SetupDiEnumDeviceInterfaces@20
usbhidiocDlg.obj : error LNK2001: unresolved external symbol __imp__SetupDiGetClassDevsA@16
usbhidiocDlg.obj : error LNK2001: unresolved external symbol _HidD_GetHidGuid@4
usbhidiocDlg.obj : error LNK2001: unresolved external symbol _HidD_FreePreparsedData@4
usbhidiocDlg.obj : error LNK2001: unresolved external symbol _HidP_GetCaps@8
usbhidiocDlg.obj : error LNK2001: unresolved external symbol _HidD_GetPreparsedData@8
msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/usbhidiocDlg.exe : fatal error LNK1120: 10 unresolved externals
Error executing link.exe.

usbhidiocDlg.exe - 11 error(s), 0 warning(s)

Can anyone help me for this problem?

Veryt thanks in advance

[1851 byte] By [AnilalSambasivan] at [2007-12-25]
# 1

You Should Link your

program with setupapi.lib.

You can give it under Link Tab in Project Settings.

You are also linking with some other libraries, so you have to specify corresponding

lib name where HID set of function defined.

Moreover, you are missing

a main function.

HTH


Sarath. at 2007-8-31 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2

Thanks for your help. I got the programe running when I rebuild the program. Thanks

AnilalSambasivan at 2007-8-31 > top of Msdn Tech,Visual C++,Visual C++ General...