Undefined reference to cv::mulSpectrum only in linux platform

asked 2014-02-27 06:15:20 -0600

feelfree gravatar image

updated 2014-02-27 06:15:51 -0600

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.

edit retag flag offensive close merge delete