今天按照论坛里的教程在macOS xcode上搭建opencv环境,搭建完以后贴了很简单的一小段代码显示运行成功了
#include <opencv2/opencv.hpp>
using namespace cv;
int main(int argc, char** argv) {
Mat image;
image = imread("/Users/zhuchengfei/Documents/test.jpg", 1);
namedWindow("Display Image", WINDOW_AUTOSIZE);
imshow("Display Image", image);
waitKey(0);
return 0;
}
但输出却出现了一段错误代码
ERROR: something wrong with flag 'flagfile' in file '/tmp/gflags-20190930-98155-11s2bsy/gflags-2.2.2/src/gflags.cc'. One possibility: file '/tmp/gflags-20190930-98155-11s2bsy/gflags-2.2.2/src/gflags.cc' is being linked both statically and dynamically into this executable.
Program ended with exit code: 1
尝试了https://blog.csdn.net/xiaxiazls/article/details/52042385的解决办法并没有成功
问一下各位如何解决orz