[libhid-discuss] how to build test_libhid.c

Tristan Sun tristans at amrel.com
Wed Sep 29 04:44:26 UTC 2010


Hi,

I am new in Linux. I need use libhid, but however I try to build the sample code, test_libhid.c,
I always fail. I try to search web site to find solutions for some days, but I still can not get solution.
I use Fedora 10, and Fedora 13. Install libusb 0.1<http://libusb.sourceforge.net/doc/>, libusb 1.0 and libhid.
The build fail message is in the following. It seems I can not link libhid library.
Does anyone can help to tell me how to build  test_libhid.c?

Thanks.

[root at localhost hh]# gcc test_libhid.c -I/usr/local/include -L/usr/local/lib  -lusb
/tmp/cc5y2JTR.o: In function `main':
hh.c:(.text+0x1c1): undefined reference to `hid_set_debug'
hh.c:(.text+0x1ce): undefined reference to `hid_set_debug_stream'
hh.c:(.text+0x1da): undefined reference to `hid_set_usb_debug'
hh.c:(.text+0x1df): undefined reference to `hid_init'
hh.c:(.text+0x217): undefined reference to `hid_new_HIDInterface'
hh.c:(.text+0x279): undefined reference to `hid_force_open'
hh.c:(.text+0x2c1): undefined reference to `hid_write_identification'
hh.c:(.text+0x309): undefined reference to `hid_dump_tree'
hh.c:(.text+0x348): undefined reference to `hid_close'
hh.c:(.text+0x384): undefined reference to `hid_delete_HIDInterface'
hh.c:(.text+0x389): undefined reference to `hid_cleanup'
collect2: ld returned 1 exit status
[root at localhost hh]#

Tristan
tristans at amrel.com<mailto:tristans at amrel.com>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20100928/b01fda0a/attachment.htm>


More information about the libhid-discuss mailing list