I don't know your are using which plug computer
base on your discribe , you should add "-I <your header file path>" into your make file
That is not realy the best option. Later on I will try it but i dont think that will work because it will need the shared .so files.
What I managed to do is to recompile and install the libusb-1.0.9 by doing this:
The cross compiler is in /opt/gcc-arm/arm-none-linux-gnueabi/
So I cross compiled using this:
edu@gimli:~/workspace/Tests/Cpp/X10/ARM/libusb-1.0.9$ ./configure --host=arm-none-linux-gnueabi --prefix=/opt/gcc-arm/arm-none-linux-gnueabi
Then i do:
make
and then
make install
This (I think) compiled the libusb-1.0.9 and instaled the files in the cross compiles folder (--prefix=/opt/gcc-arm/arm-none-linux-gnueabi)
I cheked the folder to see if the fiels are there and they are.
Now I need to compile the libusb-compat-0.1.4
So I repeat the process
edu@gimli:~/workspace/Tests/Cpp/X10/ARM/libusb-compat-0.1.4$ ./configure --host=arm-none-linux-gnueabi --prefix=/opt/gcc-arm/arm-none-linux-gnueabi
....
....edu@gimli:/media/GimliD/edu/workspaces/Tests/Cpp/X10/ARM/libusb-compat-0.1.4$ make
make all-recursive
make[1]: Entering directory `/media/GimliD/edu/workspaces/Tests/Cpp/X10/ARM/libusb-compat-0.1.4'
Making all in libusb
make[2]: Entering directory `/media/GimliD/edu/workspaces/Tests/Cpp/X10/ARM/libusb-compat-0.1.4/libusb'
/bin/sh ../libtool --tag=CC --mode=compile arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow -I/usr/local/include/libusb-1.0 -g -O2 -MT libusb_la-core.lo -MD -MP -MF .deps/libusb_la-core.Tpo -c -o libusb_la-core.lo `test -f 'core.c' || echo './'`core.c
libtool: compile: arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow -I/usr/local/include/libusb-1.0 -g -O2 -MT libusb_la-core.lo -MD -MP -MF .deps/libusb_la-core.Tpo -c core.c -fPIC -DPIC -o .libs/libusb_la-core.o
cc1: warning: include location "/usr/local/include/libusb-1.0" is unsafe for cross-compilation [-Wpoison-system-directories]
libtool: compile: arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow -I/usr/local/include/libusb-1.0 -g -O2 -MT libusb_la-core.lo -MD -MP -MF .deps/libusb_la-core.Tpo -c core.c -o libusb_la-core.o >/dev/null 2>&1
mv -f .deps/libusb_la-core.Tpo .deps/libusb_la-core.Plo
/bin/sh ../libtool --tag=CC --mode=link arm-none-linux-gnueabi-gcc -fvisibility=hidden -std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow -I/usr/local/include/libusb-1.0 -g -O2 -version-info 8:4:4 -release 0.1 -o libusb.la -rpath /opt/gcc-arm/arm-none-linux-gnueabi/lib libusb_la-core.lo -L/usr/local/lib -lusb-1.0
libtool: link: arm-none-linux-gnueabi-gcc -shared .libs/libusb_la-core.o -L/usr/local/lib /usr/local/lib/libusb-1.0.so -lrt -pthread -Wl,-soname -Wl,libusb-0.1.so.4 -o .libs/libusb-0.1.so.4.4.4
/opt/gcc-arm/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation
/usr/local/lib/libusb-1.0.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [libusb.la] Error 1
make[2]: Leaving directory `/media/GimliD/edu/workspaces/Tests/Cpp/X10/ARM/libusb-compat-0.1.4/libusb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/media/GimliD/edu/workspaces/Tests/Cpp/X10/ARM/libusb-compat-0.1.4'
make: *** [all] Error 2
edu@gimli:/media/GimliD/edu/workspaces/Tests/Cpp/X10/ARM/libusb-compat-0.1.4$
As you can see in the lines:
0.1.so.4 -o .libs/libusb-0.1.so.4.4.4
/opt/gcc-arm/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation
/usr/local/lib/libusb-1.0.so: could not read symbols: File in wrong formatIt is trying to find the shares files in /usr/local/lib/ (the ones for x86)
How can i tell the ./configure to use the fiels in my arm cross compiler? (located in /opt/gcc-arm/arm-none-linux-gnueabi)