全部生成在 Caffe 安装中给出链接器命令失败错误



按照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问题。

提前感谢。

似乎您尚未在系统中安装 OpenCV。如果您使用的是自制软件包管理器,请尝试执行以下命令

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

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

最新更新