我在.cpp寫入
VideoCapture cap(0);
Mat temp;
cap>>temp;
出現:3個錯
-1: error: mainwindow.o: undefined reference to symbol '_ZN2cv12VideoCaptureC1Ei'
/home/ywchen/ti-processor-sdk-linux-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libopencv_videoio.so.3.1:-1: error: error adding symbols: DSO missing from command line
:-1: error: collect2: error: ld returned 1 exit status
我的pro
INCLUDEPATH+= /home/ywchen/ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include \
/home/ywchen/ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/opencv \
/home/ywchen/ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/opencv2
LIBS +=/home/ywchen/ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libopencv_core.so\
/home/ywchen/ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libopencv_imgproc.so \
/home/ywchen/ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libopencv_highgui.so \
/home/ywchen/ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libopencv_imgcodecs.so \
/home/ywchen/ti-processor-sdk-linux-rt-am57xx-evm-04.02.00.09/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libopencv_videostab.so
不知哪裡錯了
yongqing wang:
pro文件中opencv的库都加了吗
yuwen Chen:
回复 yongqing wang:
一般需要加的有哪些
yongqing wang:
回复 yuwen Chen:
core imgcodecs highgui 这三个库一般都是要加的
yuwen Chen:
回复 yongqing wang:
有我都有加
yongqing wang:
回复 yuwen Chen:
这个几个库要用交叉编译的库