Please help me to build libnxt, I really want to switch from win to linux and I'm not experienced with building C projects.
I installed all libraryes related to usb sources, devel, debug that I founded in the repository (listed in first post).
I downloaded and installed libusb from:
http://libusb.sourceforge.net/
ldconfig output:
libusb-1.0.so.0 (libc6) => /usr/local/lib/libusb-1.0.so.0
libusb-1.0.so.0 (libc6) => /usr/lib/libusb-1.0.so.0
libusb-1.0.so (libc6) => /usr/local/lib/libusb-1.0.so
libusb-1.0.so (libc6) => /usr/lib/libusb-1.0.so
libusb-0.1.so.4 (libc6) => /usr/lib/libusb-0.1.so.4
I see that sources for library libusb does not have usb.h header file but libusb.h.
I tried to modify main_jlibnxt.c file to include libusb.h - the same error.
If I specify the complete path to libusb.h file I don't get first error but still have rest of the errors.
This is complete list of errors:
jlibnxt:
[echo] jni.include.dir=/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/../include jni.sys.dir= /usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/../include/linux
[cc] 1 total files to be compiled.
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:55: warning: ‘struct usb_device’ declared inside parameter list
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:55: warning: its scope is only this definition or declaration, which is probably not what you want
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c: In function ‘create_address’:
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:58: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:59: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:68: warning: implicit declaration of function ‘usb_open’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:68: warning: assignment makes pointer from integer without a cast
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:73: warning: implicit declaration of function ‘usb_get_string’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:73: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:74: warning: implicit declaration of function ‘usb_close’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:86: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:86: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:88: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:88: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c: In function ‘nxt_find_nth’:
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:101: warning: implicit declaration of function ‘usb_init’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:106: warning: implicit declaration of function ‘usb_find_busses’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:107: warning: implicit declaration of function ‘usb_find_devices’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:111: warning: implicit declaration of function ‘usb_get_busses’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:111: warning: assignment makes pointer from integer without a cast
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:112: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:116: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:116: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:118: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:119: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:120: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:121: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:126: warning: passing argument 1 of ‘create_address’ from incompatible pointer type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:55: note: expected ‘struct usb_device *’ but argument is of type ‘struct usb_device *’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c: In function ‘nxt_open’:
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:144: warning: assignment makes pointer from integer without a cast
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:146: warning: implicit declaration of function ‘usb_set_configuration’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:154: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:155: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:157: warning: implicit declaration of function ‘usb_claim_interface’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:170: warning: implicit declaration of function ‘usb_bulk_read’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c: In function ‘nxt_close’:
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:186: warning: implicit declaration of function ‘usb_release_interface’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c: In function ‘nxt_write_buf’:
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:197: warning: implicit declaration of function ‘usb_bulk_write’
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c: In function ‘nxt_serial_no’:
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:218: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:219: error: dereferencing pointer to incomplete type
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:224: warning: assignment makes pointer from integer without a cast
[cc] /home/robo/lejos_nxj/src/libnxt/main_jlibnxt.c:226: error: dereferencing pointer to incomplete type
BUILD FAILED
/home/robo/lejos_nxj/build/build.xml:85: The following error occurred while executing this line:
/home/robo/lejos_nxj/src/libnxt/build.xml:40: gcc failed with return code 1