undefined reference to `cv::Stitcher::createDefaul

2020-06-22 04:33发布

问题:

I am trying to stitch images using opencv in c++, and when the program is compiled, its throwing errors for

Stitcher stitcher = Stitcher::createDefault();

undefined reference to `cv::Stitcher::createDefault(bool)'

and for

Stitcher::Status status = stitcher.stitch(vImg, rImg);

undefined reference to `cv::Stitcher::stitch(cv::_InputArray const&, cv::_OutputArray const&)'

Please help me in fixing this error.Thanks in advance.

回答1:

This error indicates the compiler has a declaration for these functions but not a definition. Try checking your linker flags.



标签: c++ opencv