I’m trying to crosscompile a very simple test program with functions of opencv.
I’m using Ubuntu 11.10 and Codeblocks, and when i compile my code it appear this to me:
||warning: ../../lib/libopencv_core.so, needed by /root/arm-lib/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)|
||warning: ../../lib/libopencv_imgproc.so, needed by /root/arm-lib/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)|
||=== Build finished: 0 errors, 2 warnings ===|
And when I try to execute this software in ARM, I get Segmentation fault (core dumped).
The flags that I am using on Codeblocks are:
-L/usr/local/lib
-L/lib/libbxml2.so.2
-lpthread
-lrt
-lxml2
-lz
-lopencv_highgui
-lopencv_core
-lopencv_imgproc
What do you suggest? Thanks in advance
One obvious problem with your command line:
-Lmust be used only to add the libraries directories, however, you are using it to include a file in-L/lib/libbxml2.so.2, and that’s just wrong.Most probably you wanted to do:
Now, the error is clear: the system can’t find libopencv_core.so and libopencv_imgproc.so in the paths you included with
-L. I suggest you find these files and then add the appropriate directory using the-Lflag.