链接错误:对`cv :: VideoCapture :: open(std :: string const&)的未定义引用
我正在尝试使用.avi
文件作为源. (相机捕获已经可以使用.)我的项目编译没有问题,但是在链接过程中出现错误:
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&)'
我该怎么办? VideoCapture::open()
的std::string
重载放在哪个库中?
What should I do? In which library is this std::string
overload of VideoCapture::open()
put?
VideoCapture(0)
(摄像头捕获)可以编译,链接和运行,因此VideoCapture(std::string)
必须位于我已经与之链接的libs中的其他位置...对吧?
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?
OpenCV
版本:2.4.9
(昨天从git复制).
OpenCV
version: 2.4.9
(cloned from git yesterday).
问题是由我使用2.4.9
版本的2.4.5
头文件引起的.
The problem was caused by me using 2.4.5
header files for 2.4.9
version.