淘先锋技术网

首页 1 2 3 4 5 6 7

使用caffe时编译出错

include and lib

使用自己机器编译的include和lib (caffe/build/lib, caffe/include)

caffe.pb.h丢失问题:

/home/wuliwei/caffe/include/caffe/blob.hpp::: fatal error: caffe/proto/caffe.pb.h: No such file or directory
 #include "caffe/proto/caffe.pb.h"

解决方法: 用protoc从caffe/src/caffe/proto/caffe.proto生成caffe.pb.h和caffe.pb.cc

wuliwei@wulw:~/caffe/src/caffe/proto$ protoc --cpp_out=/home/wuliwei/caffe/include/caffe/ caffe.proto 

stdc++

linker error:

/usr/bin/ld: caffe_cnn_handler.o: undefined reference to symbol '_ZNSs4_Rep10_M_destroyERKSaIcE@@GLIBCXX_3.4'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line

是找不到libstdc++.so.6,解决方法是在Makefile中加入: