cv::Mat mat = cv::imread("David.jpg", cv::IMREAD_GRAYSCALE);
cv::namedWindow("David", cv::WINDOW_NORMAL);
cv::imshow("David", mat);
//just for a test
cv::Mat mat1;
split(mat, mat1);
I get the following errors
error: undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' error: undefined reference to cv::namedWindow(cv::String const&, int)’
Why some of the functions from the cv namespace compiled (imread, split) and other (namedWindow, imshow) - undefined?
Qt sees the cv namespace and the functions. the errors pop up on a build action.
I suspect my installation (sudo apt-get install libopencv-dev) isn’t good. It installed it as a source files not as a library.
That’s it - missing -lopencv_highgui. Thank you.
Now I’m facing another problem - Build is OK but when I run I get