libopencv_videoio.so, need by /lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
该博客已搬移到:https://blog.csdn.net/u013171226/article/details/108155711
在ubuntu16上面安装了HI3536的交叉编译工具链之后,在编译自己的代码时报如下的错误:
D_FILE_OFFSET_BITS=64 -I../include -g -rdynamic -std=c++11 -o flowdetect_demo ./main.o -lpthread -L../lib -lopencv_highgui -lopencv_imgproc -lopencv_core -lopencv_imgcodecs -lopencv_video -lopencv_videoio -lflowdetect
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_videoio.so, needed by ../lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_imgcodecs.so, needed by ../lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_imgproc.so, needed by ../lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_core.so, needed by ../lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
截图如下:
这是因为电脑的ubuntu16是64位的,而交叉编译工具链是32位的,解决方法是
sudo apt install lib32z1-dev
作者:cumtchw
出处:http://www.cnblogs.com/cumtchw/
我的博客就是我的学习笔记,学习过程中看到好的博客也会转载过来,若有侵权,与我联系,我会及时删除。