在MacOS上为Matlab构建caffe时出错?

时间:2018-02-14 06:32:33

标签: bash macos matlab caffe

我正在尝试在Mac上安装caffe以与Matlab一起使用,但每当我尝试运行make all时,都会出现错误(下面的命令日志)。我已经安装了必要的依赖项并修改了Makefile.config,以便取消注释CPU_ONLY := 1并取消注释MATLAB-DIR并指向我安装的Matlab。我也尝试过使用CMake,但它会立即安装pycaffe,当我尝试安装matcaffe时,它说该命令无法识别。

My-Computer-Name:caffe myusername$ make all
LD -o .build_release/lib/libcaffe.so.1.0.0
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
  "cv::imread(cv::String const&, int)", referenced from:
      caffe::WindowDataLayer<float>::load_batch(caffe::Batch<float>*) in window_data_layer.o
      caffe::WindowDataLayer<double>::load_batch(caffe::Batch<double>*) in window_data_layer.o
      caffe::ReadImageToCVMat(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, int, bool) in io.o
  "cv::imdecode(cv::_InputArray const&, int)", referenced from:
      caffe::DecodeDatumToCVMatNative(caffe::Datum const&) in io.o
      caffe::DecodeDatumToCVMat(caffe::Datum const&, bool) in io.o
  "cv::imencode(cv::String const&, cv::_InputArray const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >&, std::__1::vector<int, std::__1::allocator<int> > const&)", referenced from:
      caffe::ReadImageToDatum(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, int, int, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, caffe::Datum*) 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)
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1

0 个答案:

没有答案