# Revision history [back]

### Cross-compile OpenCV

Hi!

I am trying to cross-compile opencv on a Gumstix board. I followed the tutorial at: http://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):

[email protected]:~# 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? ### Cross-compile OpenCV Hi! I am trying to cross-compile opencv on a Gumstix board. I followed the tutorial at: http://docs.opencv.org/doc/tutorials/introduction/crosscompilation/arm_crosscompile_with_cmake.html. 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): [email protected]:~# 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?

 3 No.3 Revision StevenPuttemans 20029 ●16 ●82 ●207 http://stevenputtemans...

### 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):

[email protected]:~# g++ opencvtest.cpp -L\$(pkg-config --libs opencv)
cv::SunRasterDecoder::readData(cv::Mat&)':
to __gnu_thumb1_case_shi'
cv::BmpDecoder::readData(cv::Mat&)':
cvConvertImage':
/usr/share/OpenCV/3rdparty/lib/libIlmImf.a(IexThrowErrnoExc.cpp.o): In function Iex::throwErrnoExc(std::basic_string<char, std::char_traits<char="">, std::char_traits<char>, std::allocator<char> > const&, int)':
`