i'm trying to use my webcam using C++ and OpenCV, but i'm gettin this error
(...):Images.cpp:(.text+0x27): undefined reference to cv::VideoCapture::VideoCapture(int)
(...):Images.cpp:(.text+0x38): undefined reference to cv::VideoCapture::~VideoCapture()
(...):Images.cpp:(.text$_ZN2cv6StringD1Ev[_ZN2cv6StringD1Ev]+0x11): undefined reference to cv::String::deallocate() ...
My code:
#include <iostream>
#include <string.h>
#include "opencv2/core/core.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/videoio/videoio.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/video.hpp"
#include "opencv2/imgproc/imgproc.hpp"
using namespace std;
using namespace cv;
int main(int argc, char const *argv[])
{
VideoCapture cap(0);
return 0;
}