Run opencv test program in xcode
#include <iostream>
#include<opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main() {
Mat img;
img=imread("file:///Library/Desktop%20Pictures/Mojave%20Night.jpg");
if (img.empty()) {
cout<<"wrong"<<endl;
return -1;
}
imshow("test", img);
waitKey(0);
return 0;
}
It shows that the operation is successful, but there is no result, and an error is reported
libdyld.dylib`start:
and
dyld`__abort_with_payload:
I'm a novice. I've tried a lot of experience sharing, but I still can't solve it. I really don't know why. Please answer and thank you!