My code in Qt
LIBS += -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lopencv_highgui
#include <opencv2/opencv.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/core/utility.hpp>
using namespace cv;
Mat frame;
VideoCapture cap = VideoCapture(0);
while(1)
{
//cap.read(frame);
cap>>frame;
imshow("image", frame);
}
When I build I get
/usr/bin/ld: main.o: undefined reference to symbol ‘_ZN2cv12VideoCaptureD1Ev’
/usr/bin/ld: //usr/lib/arm-linux-gnueabihf/libopencv_videoio.so.3.2: error adding symbols: >DSO missing from command line
collect2: error: ld returned 1 exit status
What may be a problem?