fedora 15 安装opencv2.2时出现undefined reference to `cvCreateCameraCapture_V4L(int)'问题及其解决方法
来源:互联网 发布:mac练字软件 编辑:程序博客网 时间:2024/05/05 06:42
在Fedora 15 下编译OpenCV 2.2
进行到7%左右时出现"ptrdeff_t"未定义都错误,考虑到之前在Fedora 14下编译没问题,可能是内核升级后头文件包含出现变动,所以才没有包含进stddef.h头文件。找到出错文件,就我的情况而言是:OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp
在该文件的合适位置加上语句:
#include<stddef.h>
继续编译,到81%左右出现了undefined reference to `cvCreateCameraCapture_V4L(int)'错误.
参考 https://code.ros.org/trac/opencv/ticket/324
In some linux distros where V4L2 is enabled, CMake does not define the HAVE_CAMV4L macro, but the macro HAVE_CAMV4L2 is defined.
When the highgui.so is building and linked with an other program, a Link error undefined reference to cvCreateCameraCapture_V4L is detected, and the library is not finished. The compilation terminated at [ 83%] Building.
解决方法(推荐使用第二种方法):
下载的源代码里面找到OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp
下载的源代码里面找到OpenCV-2.2.0/modules/highgui/src/cap.cpp
实际上就是修改第174行。
参考文献
http://blog.csdn.net/moc062066/article/details/6616902
https://code.ros.org/trac/opencv/ticket/324
http://www.eefocus.com/DSP_geek/blog/10-12/200665_09816.html
- fedora 15 安装opencv2.2时出现undefined reference to `cvCreateCameraCapture_V4L(int)'问题及其解决方法
- undefined reference to `cvCreateCameraCapture_V4L(int)'
- libhighgui.so: undefined reference to `cvCreateCameraCapture_V4L(int)'
- linux 下安装opencv3.0在编译时出现的问题undefined reference to `parallel_pthreads_set_threads_num(int)'
- 解决编译opencv3.0时出现的问题undefined reference to `parallel_pthreads_set_threads_num(int)'
- PHP 5.3.10 编译安装时出现 undefined reference to `libiconv' 错误的解决方法
- PHP 编译安装时出现 undefined reference to `libiconv' 错误的解决方法
- 出现undefined reference to `forkpty' 错误解决方法
- 在ubunut中安装了opencv2.1之后,自己编写程序, 出现undefined reference to `cvLoadImage'
- "undefined reference to" 问题汇总及解决方法
- CodeBlocks 出现undefined reference to `GetOpenFileNameA@'问题时解决方案
- QT出现“undefined reference to `vtable for’”问题的原因及解决方法
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- ffmpeg libx264编译出现error: undefined reference to 'x264_picture_init'等问题的解决方法
- QT出现“undefined reference to `vtable for’”问题的原因及解决方法【转】
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- linux 链接库文件出现“undefined reference to" 问题的解决方法
- jQuery使用技巧
- DOM对象与jQuery对象相互转换
- background-position详解
- PLSQL可以连接 JDBC不可以连接
- ajax解析json文件
- fedora 15 安装opencv2.2时出现undefined reference to `cvCreateCameraCapture_V4L(int)'问题及其解决方法
- hideFocus(小技巧)
- css overflow
- 10种ADC软件滤波方法及程序
- 微软等面试经典100题
- GDI+入门
- HTC G7 卸载自带软件(刷Root)
- 常见浏览器兼容问题
- 浏览器兼容解决方案一