priestnot
Member level 5
So I managed to compile the libusb-1.0.9 and the libusb-compat-0.1.4 to ARM and install in to my toolchain.
But I cannot cross compile the simple lsusb.c (in attach) program.
I am cross compiling using the following command:
and it gives me the folowing errors:
What am I doing wrong?
I tried the following diferences but with the same result:
But I cannot cross compile the simple lsusb.c (in attach) program.
I am cross compiling using the following command:
Code:
arm-none-linux-gnueabi-gcc -Wall -W lsusb.c -o lsusb_exe -lusb-1.0
Code:
edu@gimli:/media/GimliD/edu/workspaces/Tests/Cpp/X10/ARM/lsusb$ arm-none-linux-gnueabi-gcc -Wall -W lsusb.c -o lsusb_exe -lusb-1.0
/tmp/ccSqklgw.o: In function `main':
lsusb.c:(.text+0x378): undefined reference to `usb_init'
lsusb.c:(.text+0x37c): undefined reference to `usb_find_busses'
lsusb.c:(.text+0x380): undefined reference to `usb_find_devices'
lsusb.c:(.text+0x3ec): undefined reference to `usb_open'
lsusb.c:(.text+0x434): undefined reference to `usb_get_string_simple'
lsusb.c:(.text+0x49c): undefined reference to `usb_get_string_simple'
lsusb.c:(.text+0x504): undefined reference to `usb_get_string_simple'
lsusb.c:(.text+0x53c): undefined reference to `usb_close'
lsusb.c:(.text+0x604): undefined reference to `usb_busses'
collect2: ld returned 1 exit status
What am I doing wrong?
I tried the following diferences but with the same result:
Code:
arm-none-linux-gnueabi-gcc -Wall -W lsusb.c -o lsusb_exe -lusb-1.0 -L/opt/gcc-arm/arm-none-linux-gnueabi/lib -I /opt/gcc-arm/arm-none-linux-gnueabi/include/libusb-1.0
arm-none-linux-gnueabi-gcc -Wall -W lsusb.c -o lsusb_exe -lusb-1.0 -L/opt/gcc-arm/arm-none-linux-gnueabi/lib -I /opt/gcc-arm/arm-none-linux-gnueabi/include
arm-none-linux-gnueabi-gcc -Wall -W lsusb.c -o lsusb -lusb-1.0 -I/opt/gcc-arm/arm-none-linux-gnueabi/include
arm-none-linux-gnueabi-gcc -Wall -W lsusb.c -o lsusb -lusb-1.0 -I/opt/gcc-arm/arm-none-linux-gnueabi/include/libusb-1.0
arm-none-linux-gnueabi-gcc -Wall -W lsusb.c -o lsusb -lusb-1.0 -L/opt/gcc-arm/arm-none-linux-gnueabi/lib
Last edited: