本人参考http://blog.csdn.net/baobei0112/article/details/50954934#comments进行配置
中途遇到了一些问题如下
1、can not find openblas
不知为什么我当时明明已经安装过了,还是报这个错,通过下两个语句选择一个语句执行即可
brew install homebrew/science/openblas ---> 直接安装
brew install --build-from-source homebrew/science/openblas --> 通过编译源码安装
同时还需要将openblas的lib路径添加到Library Search Paths中
2、Undefined symbols for architecture x86_64: for caffe build
cv::imread(cv::String const&, int)", referenced from:
caffe::WindowDataLayer<float>::InternalThreadEntry() in window_data_layer.o
caffe::WindowDataLayer<double>::InternalThreadEntry() in window_data_layer.o
caffe::ReadImageToCVMat(std::string const&, int, int, bool) in io.o
"cv::imdecode(cv::_InputArray const&, int)", referenced from:
caffe::DecodeDatumToCVMat(caffe::Datum const&, int, int, bool) in io.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
出现上述信息的原因是cv::imread是在opencv_imgcodecs中定义的,然而这篇博客中并没有加-l
opencv_imgcodecs,将它在Linker Flags也加上即可