0

I am now building a library that relies on some functions of opencv, and the way how I use opencv is that I link it statically. The built library, however, is a dynamic one (dll.dll in windows and dll.so in linux for example). After having the library, I have no difficult in building a demo program that uses this dynamic library (.dll) in the windows environment. It just works. However,when it was build on Linux. It is a different story. I can build that dynamic library (dll.so), but when I invoke it in the demo program, I have the following errors:

dll.so||undefined reference to `cv::mulSpectrums(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, int, bool)'|

dll.so||undefined reference to `cv::getOptimalDFTSize(int)'|

dll.so.so||undefined reference to `cv::dft(cv::_InputArray const&, cv::_OutputArray const&, int, int)'|||=== Build finished: 3 errors, 0 warnings (0 minutes, 4 seconds) ===|

I do not know what I can do in this situation. In fact, I did not call cv::mulSpectrums, cv::getOptimalDFTSize and cv::dft when I built the dynamic library dll.so. Any ideas? Thanks.

1 Answer 1

0

The problem I have found comes from the library order, and you can check OpenCV undefined references for more details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.