Ask Your Question

mdtux's profile - activity

2014-05-19 04:52:38 -0600 commented question Cross-compile OpenCV

the pkg-config command above is with the backticks..

2014-05-19 04:50:18 -0600 commented question Cross-compile OpenCV

I am not sure about that but pkg-config --libs opencv yields same outcome. I also tried providing the library paths manually to no avail..

2014-05-17 09:43:47 -0600 received badge  Editor (source)
2014-05-16 09:05:59 -0600 asked a question Cross-compile OpenCV

Hi!

I am trying to cross-compile opencv on a Gumstix board. I followed the tutorial at: docs.opencv.org/doc/tutorials/introduction/crosscompilation/arm_crosscompile_with_cmake.html.

First thing to improve the guide: it is my understanding that it must be used static linking for the cross-compiling to work properly. I solved this using: -DBUILD_SHARED_LIBS=OFF. If I am correct would be helpful to mention it.

However, this is not the only problem. The compilation finishes without errors but when I try to compile a simple example I get a lot of undefined reference (I post here just a few lines):

root@overo:~# g++ opencvtest.cpp -L$(pkg-config --libs opencv)
/usr/lib/libopencv_highgui.a(grfmt_sunras.cpp.o): In function `cv::SunRasterDecoder::readData(cv::Mat&)':
grfmt_sunras.cpp:(.text._ZN2cv16SunRasterDecoder8readDataERNS_3MatE+0x158): undefined reference to `__gnu_thumb1_case_shi'
/usr/lib/libopencv_highgui.a(grfmt_bmp.cpp.o): In function `cv::BmpDecoder::readData(cv::Mat&)':
grfmt_bmp.cpp:(.text._ZN2cv10BmpDecoder8readDataERNS_3MatE+0x19a): undefined reference to `__gnu_thumb1_case_shi'
/usr/lib/libopencv_highgui.a(utils.cpp.o): In function `cvConvertImage':
utils.cpp:(.text.cvConvertImage+0x146): undefined reference to `__gnu_thumb1_case_shi'
/usr/share/OpenCV/3rdparty/lib/libIlmImf.a(IexThrowErrnoExc.cpp.o): In function `Iex::throwErrnoExc(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
..
..

Do you know why I get these errors?