opencv2.1移植arm完毕后,在pc机上linux环境,make测试程序找不到libcv.so libcxcore.so libhighgui.so libml.so这些动态库。(我是和qt在一起用的)而我在Makefile里已经把路径都包含进去了,怎么回事啊?
我的Makefile:
INCPATH = -I/usr/local/arm/qte-4.8.0/mkspecs/qws/linux-arm-g++ -I. -I/usr/local/arm/qte-4.8.0/include/QtCore -I/usr/local/arm/qte-4.8.0/include/QtNetwork -I/usr/local/arm/qte-4.8.0/include/QtGui -I/usr/local/arm/qte-4.8.0/include -I/usr/local/arm/opencv-2.1/include/opencv -I. -I.
LINK = arm-linux-g++ -lts
LFLAGS = -Wl,-O1 -Wl,-rpath,/usr/local/arm/qte-4.8.0/lib
LIBS = $(SUBLIBS) -L/usr/local/arm/qte-4.8.0/lib /usr/local/arm/opencv-2.1/lib/libcv.so /usr/local/arm/opencv-2.1/lib/libcvaux.so /usr/local/arm/opencv-2.1/lib/libcxcore.so /usr/local/arm/opencv-2.1/lib/libhighgui.so /usr/local/arm/opencv-2.1/lib/libml.so -lQtGui -L/usr/local/arm/qte-4.8.0/lib -lQtNetwork -lQtCore -lpthread
make时提示错误如下:
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libcxcore.so, needed by /usr/local/arm/opencv-2.1/lib/libcv.so, not found (try using -rpath or -rpath-link)
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libcv.so, needed by /usr/local/arm/opencv-2.1/lib/libcvaux.so, not found (try using -rpath or -rpath-link)
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libhighgui.so, needed by /usr/local/arm/opencv-2.1/lib/libcvaux.so, not found (try using -rpath or -rpath-link)
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libml.so, needed by /usr/local/arm/opencv-2.1/lib/libcvaux.so, not found (try using -rpath or -rpath-link)
所有的方法都试了,那几个库也拷贝到usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/lib/ 下了,可还是不中。 ps:我的交叉编译器是arm-linux-gcc-4.3.2。到底怎么回事啊?? 我明明指定了,哪位大神指点一下后生,我的QQ1603944332 先谢谢各位了!
------解决方案--------------------
错误写的很清楚,
needed by /usr/local/arm/opencv-2.1/lib/libcv.so
缺少这个库,你看看程序的依赖吧。ldd命令,或者readelf命令
------解决方案--------------------
确认libcv.so libcvaux.so 这两个库是否在/usr/local/arm/opencv-2.1/lib目录下。
不行就把这个两个so放在/usr/local/arm/4.3.2里面对应的lib目录下吧。