Ask Your Question

Mr.Curious's profile - activity

2017-08-23 16:22:00 -0600 commented question Building minimal OpenCV with just Features2D

Added the error message to the question - thanks.

2017-08-22 16:46:21 -0600 received badge  Editor (source)
2017-08-22 16:32:35 -0600 asked a question Building minimal OpenCV with just Features2D

Hi

I want to build a minimal version of OpenCV 3.2.0 which includes the features2d module, for including in an iOS project. I'm using the handy build_framework.py script to generate the library.

By reading the CMakeLists.txt files, I gather that features2d requires core, flann, imgproc, and ml. None of those have additional dependencies so it should be possible to build the library excluding all but those 5.

However, while that does build, I get linker errors when trying to build an app against it. If I also include the calib3d module, the errors go away. This is rather strange as none of the above modules have a dependency on calib3d.

Specific error message when building a mobile app using this library without calib3d included:

Undefined symbols for architecture arm64: "cv::findHomography(cv::_InputArray const&, cv::_InputArray const&, int, double, cv::_OutputArray const&, int, double)", referenced from: myMethod in myLibrary.a(myLibrary.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Appreciate any pointers.