1

按照caffe安装中的所有步骤后,我发现这个错误:

clang: warning: argument unused during compilation: '-pthread'
Undefined symbols for architecture x86_64:
  "cv::imread(std::string const&, int)", referenced from:
      caffe::WindowDataLayer<float>::InternalThreadEntry() in window_data_layer.o
      caffe::WindowDataLayer<double>::InternalThreadEntry() in window_data_layer.o
      caffe::ReadImageToDatum(std::string const&, int, int, int, bool, 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] Error 1

可以做什么。我尝试了所有可能的情况,重新安装并在 githun 中查找问题。

提前谢谢。

4

1 回答 1

1

好像您还没有在系统中安装 OpenCV。如果您使用的是Homebrew包管理器,请尝试执行以下命令

brew tap homebrew/science
brew install homebrew/science/opencv

如果上述两行命令执行时没有任何错误,请尝试再次构建 Caffe。

于 2015-02-04T07:27:15.450 回答