Linking error: undefined reference to `cv::VideoCapture::open(std::string const&)`

China☆狼群 提交于 2019-12-13 07:03:04

问题


I'm trying to use an .avi file as my source. (Camera capture already works.) My project compiles without problems, but during linking I get the error:

undefined reference to 'cv::VideoCapture::open(std::string const&)'

What should I do? In which library is this std::string overload of VideoCapture::open() put?

Edit: VideoCapture(0) (camera capture) compiles, links and works, so VideoCapture(std::string) has to be somewhere else that in libs I'm already linking with... right?

Edit: OpenCV version: 2.4.9 (cloned from git yesterday).


回答1:


The problem was caused by me using 2.4.5 header files for 2.4.9 version.



来源:https://stackoverflow.com/questions/16964257/linking-error-undefined-reference-to-cvvideocaptureopenstdstring-const

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!