View Single Post
Old 07-09-2012, 09:19 PM   #3
arooni
Enthusiast
arooni began at the beginning.
 
Posts: 34
Karma: 26
Join Date: Jul 2012
Device: kindle keyboard (wifi + 3g)
Also can't get it to compile (yes I did install the latest libusb library before trying to compile. I also ensured that I added /usr/local/lib (where the libusb libraries were installed to, to my .bashrc file to set the path correctly).

I also tried installing the libusbx-1.0.12/ package and moving it to your apps root directory, renaming it to libusb-1.0 as you have in your .c file but that didn't work either.

LilArooni ~/downloads/k3flasher: echo $PATH
/home/david/.rvm/gems/ruby-1.9.3-p194/bin:/home/david/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/david/.rvm/rubies/ruby-1.9.3-p194/bin:/home/david/.rvm/bin:/home/david/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/david/bin/ec2-api-tools-1.3-30349/bin:/home/david/bin:/home/david/bin/get-shit-done:/home/david/bin:/home/david/.rvm/bin:/home/david/bin/ec2-api-tools-1.3-30349/bin:/home/david/bin:/home/david/bin/get-shit-done:/home/david/bin:/usr/local/lib:/home/david/.rvm/bin

LilArooni ~/downloads/k3flasher: make
gcc -g -O0 -lusb-1.0 k3flasher.c -o k3flasher
k3flasher.c: In function ‘flash_program’:
k3flasher.c:394:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘__off_t’ [-Wformat]
k3flasher.c:394:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘__off_t’ [-Wformat]
/tmp/cceaU0h8.o: In function `usb_send':
/home/david/downloads/k3flasher/k3flasher.c:44: undefined reference to `libusb_bulk_transfer'
/home/david/downloads/k3flasher/k3flasher.c:46: undefined reference to `libusb_error_name'
/tmp/cceaU0h8.o: In function `usb_receive':
/home/david/downloads/k3flasher/k3flasher.c:63: undefined reference to `libusb_bulk_transfer'
/home/david/downloads/k3flasher/k3flasher.c:65: undefined reference to `libusb_error_name'
/tmp/cceaU0h8.o: In function `main':
/home/david/downloads/k3flasher/k3flasher.c:463: undefined reference to `libusb_init'
/home/david/downloads/k3flasher/k3flasher.c:465: undefined reference to `libusb_error_name'
/home/david/downloads/k3flasher/k3flasher.c:469: undefined reference to `libusb_open_device_with_vid_pid'
/home/david/downloads/k3flasher/k3flasher.c:475: undefined reference to `libusb_open_device_with_vid_pid'
/home/david/downloads/k3flasher/k3flasher.c:482: undefined reference to `libusb_claim_interface'
/home/david/downloads/k3flasher/k3flasher.c:484: undefined reference to `libusb_error_name'
/home/david/downloads/k3flasher/k3flasher.c:523: undefined reference to `libusb_release_interface'
/home/david/downloads/k3flasher/k3flasher.c:524: undefined reference to `libusb_close'
/home/david/downloads/k3flasher/k3flasher.c:529: undefined reference to `libusb_open_device_with_vid_pid'
/home/david/downloads/k3flasher/k3flasher.c:533: undefined reference to `libusb_claim_interface'
/home/david/downloads/k3flasher/k3flasher.c:535: undefined reference to `libusb_error_name'
/home/david/downloads/k3flasher/k3flasher.c:641: undefined reference to `libusb_release_interface'
/home/david/downloads/k3flasher/k3flasher.c:642: undefined reference to `libusb_close'
/home/david/downloads/k3flasher/k3flasher.c:644: undefined reference to `libusb_exit'
collect2: ld returned 1 exit status
make: *** [k3flasher] Error 1

Last edited by arooni; 07-09-2012 at 09:27 PM.
arooni is offline   Reply With Quote