Pachi找不到caffe / caffe.hpp:没有这样的文件或目录

时间:2016-08-05 08:46:24

标签: makefile caffe

我正在尝试使用Caffe(https://github.com/pasky/pachi)支持编译Go / Baduk引擎Pachi(http://caffe.berkeleyvision.org)。

Caffe安装正常,它位于/ something / PACHI_GO_ENGINE / caffe /

caffe.hpp位于:

   /something/PACHI_GO_ENGINE/caffe/distribute/include/caffe/caffe.hpp
   /something/PACHI_GO_ENGINE/caffe/include/caffe/caffe.hpp

我还按照说明更新了Pachi Makefile:

  - Edit Makefile, set DCNN=1, point it to where caffe is installed and build.

我甚至将... include / caffe /复制到/ usr / local / lib,因为这应该是默认位置。

Makefile更改:

DCNN=1
#CAFFE_LIB=/usr/local/lib
CAFFE_LIB=/something/PACHI_GO_ENGINE/caffe/distribute/include 
#(and several variations of this)

我仍然得到:

[CC]   fbook.c
[CC]   chat.c
[CXX]   dcnn.cpp
dcnn.cpp:13:27: fatal error: caffe/caffe.hpp: No such file or directory
compilation terminated.
Makefile.lib:78: recipe for target 'dcnn.o' failed
make: *** [dcnn.o] Error 1

1 个答案:

答案 0 :(得分:0)

CAFFE_LIB变量指向caffe.so或caffe.a所在的路径。在您的情况下,dcnn.cpp找不到头文件。

虽然/something/PACHI_GO_ENGINE/caffe/distribute/include中存在头文件,pachi将无法检测到它们,因为使用变量INCLUDES提及了头文件路径。您必须将此路径附加到INCLUDES变量,而不是CAFFE_LIB