我正在尝试编译带有Caffe (http://caffe.berkeleyvision.org)支持的Go/Baduk engine Pachi (https://github.com/pasky/pachi)。
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发布于 2016-08-05 17:55:35
caffe.a变量指向caffe.so或CAFFE_LIB所在的路径。在您的示例中,dcnn.cpp找不到头文件。
尽管头文件存在于/something/PACHI_GO_ENGINE/caffe/distribute/include中,但pachi不会检测到它们,因为头文件路径是使用变量INCLUDES提到的。您必须将此路径附加到INCLUDES变量,而不是CAFFE_LIB。
https://stackoverflow.com/questions/38785002
复制相似问题