#include
using namespace cv;
int main()
{
Mat img=imread(\"cornea.jpg\");
imshow(\"src\",img);
waitKey(0);
return 0;
}
You seem to be mixing Debug and Release versions of the OpenCV libraries. https://github.com/Itseez/opencv/issues/5581 You should only include and link against the normal Release library, or againt a Debug library you built yourself.
In your case, this may come from the double include -cflags -I /usr/local/include/opencv
. I would try remove all the manual paths and just write pkg-config --cflags --libs opencv
(to the packaged Release version).
Note that /usr/local/include
is a standard include path and will always be searched. You could try to exclude standard paths with -nostdinc
https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html
Another option is to uninstall one of the two versions, or remove one version away from the standard paths.