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.

feelfree
  • 11,175
  • 20
  • 96
  • 167

1 Answers1

0

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

Community
  • 1
  • 1
feelfree
  • 11,175
  • 20
  • 96
  • 167