I am trying to compile a program that uses libusb. It is going to interface with the microsoft xbox on a board that uses a TI Omap processor. I am getting the following undefined references and I am not too sure what to do from the messages I am getting.
Code:
arm-none-linux-gnueabi-gcc -o kinectTestTry1 usb_libusb10.c
/root/CodeSourcery/Sourcery_G++_Lite/bin/../arm-none-linux-gnueabi/libc/usr/lib/crt1.o: In function `_start':
init.c:(.text+0x34): undefined reference to `main'
/tmp/cckCeRjr.o: In function `fnusb_num_devices':
usb_libusb10.c:(.text+0x134): undefined reference to `libusb_get_device_list'
usb_libusb10.c:(.text+0x18c): undefined reference to `libusb_get_device_descriptor'
usb_libusb10.c:(.text+0x1fc): undefined reference to `libusb_free_device_list'
/tmp/cckCeRjr.o: In function `fnusb_init':
usb_libusb10.c:(.text+0x240): undefined reference to `libusb_init'
/tmp/cckCeRjr.o: In function `fnusb_shutdown':
usb_libusb10.c:(.text+0x2dc): undefined reference to `libusb_exit'
/tmp/cckCeRjr.o: In function `fnusb_process_events':
usb_libusb10.c:(.text+0x318): undefined reference to `libusb_handle_events'
/tmp/cckCeRjr.o: In function `fnusb_open_subdevices':
usb_libusb10.c:(.text+0x394): undefined reference to `libusb_get_device_list'
usb_libusb10.c:(.text+0x3f4): undefined reference to `libusb_get_device_descriptor'
usb_libusb10.c:(.text+0x46c): undefined reference to `libusb_open'
usb_libusb10.c:(.text+0x4a0): undefined reference to `fn_log'
usb_libusb10.c:(.text+0x4c4): undefined reference to `libusb_claim_interface'
usb_libusb10.c:(.text+0x4e8): undefined reference to `fn_log'
usb_libusb10.c:(.text+0x4f8): undefined reference to `libusb_close'
usb_libusb10.c:(.text+0x568): undefined reference to `libusb_open'
usb_libusb10.c:(.text+0x59c): undefined reference to `fn_log'
usb_libusb10.c:(.text+0x5c0): undefined reference to `libusb_claim_interface'
usb_libusb10.c:(.text+0x5e4): undefined reference to `fn_log'
usb_libusb10.c:(.text+0x5f4): undefined reference to `libusb_close'
usb_libusb10.c:(.text+0x64c): undefined reference to `libusb_free_device_list'
usb_libusb10.c:(.text+0x698): undefined reference to `libusb_release_interface'
usb_libusb10.c:(.text+0x6a8): undefined reference to `libusb_close'
usb_libusb10.c:(.text+0x6cc): undefined reference to `libusb_release_interface'
usb_libusb10.c:(.text+0x6dc): undefined reference to `libusb_close'
/tmp/cckCeRjr.o: In function `fnusb_close_subdevices':
usb_libusb10.c:(.text+0x738): undefined reference to `libusb_release_interface'
usb_libusb10.c:(.text+0x748): undefined reference to `libusb_close'
usb_libusb10.c:(.text+0x778): undefined reference to `libusb_release_interface'
usb_libusb10.c:(.text+0x788): undefined reference to `libusb_close'
/tmp/cckCeRjr.o: In function `iso_callback':
usb_libusb10.c:(.text+0x828): undefined reference to `fn_log'
usb_libusb10.c:(.text+0x8dc): undefined reference to `libusb_submit_transfer'
usb_libusb10.c:(.text+0x90c): undefined reference to `fn_log'
/tmp/cckCeRjr.o: In function `fnusb_start_iso':
usb_libusb10.c:(.text+0xa30): undefined reference to `fn_log'
usb_libusb10.c:(.text+0xa4c): undefined reference to `libusb_alloc_transfer'
usb_libusb10.c:(.text+0xb08): undefined reference to `libusb_submit_transfer'
usb_libusb10.c:(.text+0xb34): undefined reference to `fn_log'
/tmp/cckCeRjr.o: In function `fnusb_stop_iso':
usb_libusb10.c:(.text+0xbe0): undefined reference to `libusb_cancel_transfer'
usb_libusb10.c:(.text+0xc14): undefined reference to `libusb_handle_events'
usb_libusb10.c:(.text+0xc58): undefined reference to `libusb_free_transfer'
/tmp/cckCeRjr.o: In function `fnusb_control':
usb_libusb10.c:(.text+0xd0c): undefined reference to `libusb_control_transfer'
collect2: ld returned 1 exit status
From what I can collect these are issues with the fact that the compiler can't find the libusb library as I believe these functions are defined there. However I am not too sure how to link the library to the compiler or if this is even what is going on. A little light on the situation can help me tremendously on how to proceed.
Thanks.
-V