Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Undefined reference to cv::solvePnP...

Hi,

I am using OpenCV on Windows. I develop on CodeBlocks. I linked the librairies, like you can see here :

image description

I don't have any problem to use functions that are declared in opencv2/imgproc/imgproc.hpp library. Thus, I can't use functions that are declared in opencv2/calib3d/calib3d.hpp such as cv::solvePnP and others. The compiler returns me this error :

  undefined reference to `cv::solvePnP(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, bool, int)'

I guess that the origin of the problem is that there is no dynamic library for calib3d that is linked. But I don't know how to add it.

Thanks for any help,