Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

cannnot statically compile opencv code

$
0
0
Hello, I have statically cross compiled opencv-2.4.13 for ARM , the installation directory is /Desktop/opencv-build. now I am trying to compile a simple opencv code that displays an image using this command: /arm-buildroot-linux-uclibcgnueabi-g++ opencv.cpp -L/Desktop/opencv-build/lib/libopencv_highgui.a -L/Desktop/opencv-build/lib/libopencv_imgproc.a -L/Desktop/opencv-build/lib/libopencv_core.a -o ocvccode I then get this error message opencv.cpp:(.text+0x7c): undefined reference to `cv::imread(std::string const&, int)' opencv.cpp:(.text+0xc8): undefined reference to `cv::namedWindow(std::string const&, int)' opencv.cpp:(.text+0x118): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)' opencv.cpp:(.text+0x12c): undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)' opencv.cpp:(.text+0x14c): undefined reference to `cv::waitKey(int)' /tmp/ccksKPb6.o: In function `cv::Mat::~Mat()': opencv.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x3c): undefined reference to `cv::fastFree(void*)' /tmp/ccksKPb6.o: In function `cv::Mat::release()': opencv.cpp:(.text._ZN2cv3Mat7releaseEv[_ZN2cv3Mat7releaseEv]+0x58): undefined reference to `cv::Mat::deallocate()' collect2: error: ld returned 1 exit status how to solve this and is there is any other way to statically compile opencv code for ARM?

Viewing all articles
Browse latest Browse all 19555


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>