学Linux,上红联!
Linux系统教程
您的位置: Linux系统教程 > Ubuntu系统 >

Ubuntu安装opencv后编译出现connot find -lopencv_imgcodecs

时间:2017-09-13来源:linux网站 作者:IT远征军
Ubuntu 14.04 安装opencv3.0后,caffe编译出现connot find -lopencv_imgcodecs的解决方式:
 
先将Makefile.config文件中
OPENCV_VERSION :=
3 注释掉,只修改USE_OPENCV := 1
 
修改后的结果:
USE_OPENCV := 1
#OPENCV_VERSION := 3
 
在caffe根目录下,找到Makefile文件,打开文件
查找“Derive include and lib directories”一节,修改“LIBRARIES +=”的最后一行(LIBRARIES +=opencv_imgcodecs ),增加opencv_imgcodecs
opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
(此时应该变为LIBRARIES += opencv_imgcodecs  opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs)
保存,退出。
 
注意:在做前边的基础工作是将Makefile.config文件中
OPENCV_VERSION :=
3 注释掉,只修改USE_OPENCV := 1
 
再在caffe目录下,sudo make all -j8一下,问题解决
# Uncomment
if you're using OpenCV 3OPENCV_VERSION :=
3
# Uncomment
if you're using OpenCV 3OPENCV_VERSION :=
3
 
本文永久更新地址:http://www.linuxdiyf.com/linux/32589.html
顶上去
(0)
0%
踩下去
(0)
0%
------分隔线----------------------------