I am trying to run my simple program with caffe and i got a error
#include <iostream>
#include <caffe/caffe.hpp>
#include <memory>
using namespace std;
using namespace caffe;
int main(int argc, char** argv) {
shared_ptr<Net<float> > net_;
string file_name="it doesn't matter ";
net_.reset(new Net<float>(file_name, TEST));
// or just: Net<float> caffe_test_net(file_name, TEST);
}
It's built without problem, but when I run program Error: symbol lookup error: /home/parrot/eclipse/workspace/Test_Caffe/Debug/Test_Caffe: undefined symbol: _ZN5caffe3NetIfEC1ERKSsNS_5PhaseEPKS1_
I noted that: problem appear when I use in code caffe::TEST or caffe::TRAIN. I think there are some problem connected to: caffe::Phase. So I can't create caffe::Net , becouse I can't use caffe::TEST. When i use other class\function... etc from caffe library, There aren't produce this Error.
I use IDE: Eclipse to built project. Some report from console:
make all
Building file: ../src/Test_Caffe.cpp
Invoking: Cross G++ Compiler
g++ -I"/home/smilart/0_Intall/1 caffe-rc3/include/" -I/usr/local/cuda-7.5/include/ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Test_Caffe.d" -MT"src/Test_Caffe.o" -o "src/Test_Caffe.o" "../src/Test_Caffe.cpp"
Finished building: ../src/Test_Caffe.cpp
Building target: Test_Caffe
Invoking: Cross G++ Linker
g++ -L/usr/local/cuda/lib64/ -L"/home/smilart/0_Intall/1 caffe-rc3/build/lib/" -o "Test_Caffe" ./src/Test_Caffe.o -lboost_system -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lcudart -lcublas -lcurand -lboost_filesystem -lglog -lprotobuf -lcaffe
Finished building target: Test_Caffe