问题描述
- arm-linux/bin/ld: cannot find -lopencv_imgproc
- 用qte编译一个opencv程序时,显示如下错误:
ligang@ligang-virtual-machine:/work/qtepro/opencv$ make
/mysoftware/qte/bin/qmake -unix -o Makefile opencv.pro
arm-linux-g++ -Wl-O1 -Wl-rpath/mysoftware/qte/lib -o opencv main.o -L/mysoftware/qte/lib -lopencv_imgproc -lopencv_core -lopencv_highgui -lopencv_ml /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_ml.so -lQtNetwork -L/mysoftware/tslib/lib -L/mysoftware/qte/lib -lQtCore -lm -lrt -ldl -lpthread
/mysoftware/gcc-3.4.5-glibc-2.3.6/bin/../lib/gcc/arm-linux/3.4.5/../../../../arm-linux/bin/ld: skipping incompatible /mysoftware/qte/lib/libopencv_imgproc.so when searching for -lopencv_imgproc
/mysoftware/gcc-3.4.5-glibc-2.3.6/bin/../lib/gcc/arm-linux/3.4.5/../../../../arm-linux/bin/ld: skipping incompatible /mysoftware/qte/lib/libopencv_imgproc.so when searching for -lopencv_imgproc
/mysoftware/gcc-3.4.5-glibc-2.3.6/bin/../lib/gcc/arm-linux/3.4.5/../../../../arm-linux/bin/ld: cannot find -lopencv_imgproc
配置应该都是正确的,难道是opencv的库没有头文件库吗?还是需要该它的symbollink?
解决方案
ld是连接器吧,应该是连接器没有找到库文件,你在makefile文件里面要加上库的路径才行
希望能帮到你。
解决方案二:
对应的lib库文件不在ld搜索路径中,你需要系统中找到,然后-L指定
时间: 2024-10-25 03:06:25