I know linking external custom libraries can be painfull and in fact it is..
I have sombe libraries wich I have to use in my next program, I am trying do link these libraries but nothing works fine.
First of all I am compiling from an x86 with arm-none-linux-gnueabi (installed into
/opt/arm/) , so I will have to move the binaries to another machines. The standard process works always fine for Linux system binaries.
On my x86 system I have copied the custom library binaries into
Code:
/opt/arm/arm-none-linux-gnueabi/libc/lib/customLibs/
, and into **/usr/lib/**into the ARM system.
Then I copied the header files into
Code:
/opt/arm/arm-none-linux-gnueabi/libc/usr/include/customLibs/
on the x86 system and then into **/usr/inlcude** on the ARM system, as I did for the library binaries.
When I compile with make on the x86 machine, I execute:
Code:
arm-none-linux-gnueabi-g++ main.cc -o main -I /opt/arm/arm-none-linux-gnueabi/libc/usr/include/customLibs -L /opt/arm/arm-none-linux-gnueabi/libc/lib/customLibs -l /opt/arm/arm-none-linux-gnueabi/libc/lib/customLibs/customLib.so
and I got
Code:
/opt/arm/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -l/opt/arm/arm-none-linux-gnueabi/libc/lib/customLibs/customLib.so
collect2: error: ld returned 1 exit status
make: *** [main] Error 1
However the library is into the path...
What's wrong with my command line arguments ?
Thank you in advance.