Hello everyone,
I'm trying to cross-compile an example of OpenCV 2.4.3 executing this:
arm-linux-gnueabi-g++ main.cpp -o test1 `pkg-config opencv --libs` `pkg-config opencv --cflags`.
It returns the following error:
/usr/local/lib/libopencv_calib3d.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
I already got the OpenCV libs compiled for ARM, and I'm using a wandoboard.
you can find the solution for Yocto and LTIB in the last 2 posts of this blog: http://imxcv.blogspot.com.br/
regards,
Andre
I think the compiler is trying to use your HOST lib, which is an X86 binary. The problem is on the linking phase, so may export something like this
export LD="<the arm loader> --sysroot=<the target filesystem>"
Then compile.
In the future, try either creating a Makefile or even better, a Yocto recipe, so you got all this environment variables loaded for you.
Leo
instead of "the target filesystem" should I put mi root filesystem path?
That is correct.
In fact, can you try compiling your code after running these steps: i.MX Yocto Project: How can I compile the kernel manually?
what do you mean by "the arm loader"?
Sorry, I mean the linker
arm-linux-gnueabi-ld