caffe icon indicating copy to clipboard operation
caffe copied to clipboard

Undefined Reference to caffe::~Datum()

Open crazymuse opened this issue 12 years ago • 2 comments

I am trying to manually compile convert_cifer_data.cpp

g++ convert_cifar_data.cpp -L/usr/local/lib -L/usr/local/Cellar/boost/1.55.0_1/lib -L/usr/local/lib -L/usr/lib -L/usr/local/Cellar/boost/1.55.0_1/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -lcudart -lcublas -lcurand -lpthread -lglog -lprotobuf -lleveldb -lsnappy -lboost_system -lhdf5_hl -lhdf5 -lopencv_core -lopencv_highgui -lopencv_imgproc -lcblas -lboost_python -lpython2.7

I do have caffe.pb.h and caffe.pb.cc which is generated by protoc,

My error is like this : convert_cifar_data.cpp:(.text+0xc20): undefined reference to `caffe::Datum::~Datum()

Is there any further linker, or any path or anything which I need to add in addition to the existing? I am unable to get documentation reg manual conversion of convert_cifer_data.cpp to executable object. I need some help regarding the flow of compilation . . .

crazymuse avatar Sep 16 '14 06:09 crazymuse

You forgot to link with -lcaffe.

bug-fixed avatar Sep 16 '14 07:09 bug-fixed

Error got resolved by using default compilation path . . . ie in $CAFFE_ROOT, sudo make all . . .

crazymuse avatar Sep 17 '14 10:09 crazymuse