您的位置:首页 > Web前端

Xcode下配置Caffe遇到的坑以及解决办法

2016-07-05 22:41 387 查看
本人参考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中定义的,然而这篇博客中并没有加-lopencv_imgcodecs,将它在Linker Flags也加上即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: