链接错误:对`cv :: VideoCapture :: open(std :: string const&)的未定义引用

编程入门 行业动态 更新时间:2024-10-09 17:21:09
本文介绍了链接错误:对`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.

更多推荐

链接错误:对`cv :: VideoCapture :: open(std :: string const&)的未定义引用

本文发布于:2023-11-24 16:56:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1626063.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   未定义   链接   cv   amp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!