I installed the opencv library by using apt:
sudo apt install libopencv-dev libopencv-contrib-dev
But how to involve the installed library into my own project without using cmake? I tried directly including the headers but failed:
#include<opencv2/opencv.hpp>
int main(){
cv::Mat mat;
return 0;
}
By the way, I compile the project by g++:
g++ tt_opencv.cpp -o test
Should i add an -I{path}
option when compiling?