yan99033 / monodepth-cpp

Tensorflow C++ implementation for single-image depth estimation (Monodepth)
MIT License
105 stars 33 forks source link

Undefined reference in dynamic library libmonodepth.so #9

Closed liu657276074 closed 5 years ago

liu657276074 commented 5 years ago

Hi yan99033 After I define the path to tensorflow in CMakeLists, there are some errors happened during compile as: ------------------------------------------------------------Description----------------------------------------------------- libmonodepth.so:对‘tensorflow::SessionOptions::SessionOptions()’未定义的引用 libmonodepth.so:对‘tensorflow::TensorShapeBase::TensorShapeBase(absl::Span)’未定义的引用 libmonodepth.so:对‘tensorflow::internal::LogMessageFatal::LogMessageFatal(char const, int)’未定义的引用 libmonodepth.so:对‘tensorflow::Tensor::Tensor()’未定义的引用 libmonodepth.so:对‘tensorflow::TensorShapeRep::DestructorOutOfLine()’未定义的引用 libmonodepth.so:对‘tensorflow::Scope::NewRootScope()’未定义的引用 libmonodepth.so:对‘tensorflow::Scope::~Scope()’未定义的引用 libmonodepth.so:对‘tensorflow::Tensor::~Tensor()’未定义的引用 libmonodepth.so:对‘tensorflow::internal::CheckOpMessageBuilder::ForVar2()’未定义的引用 libmonodepth.so:对‘tensorflow::GraphDef::~GraphDef()’未定义的引用 libmonodepth.so:对‘tensorflow::GPUOptions google::protobuf::Arena::CreateMaybeMessage(google::protobuf::Arena)’未定义的引用 libmonodepth.so:对‘tensorflow::ReadBinaryProto(tensorflow::Env, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::MessageLite)’未定义的引用 libmonodepth.so:对‘tensorflow::GraphDef::GraphDef()’未定义的引用 libmonodepth.so:对‘tensorflow::TfCheckOpHelperOutOfLine[abi:cxx11](tensorflow::Status const&, char const)’未定义的引用 libmonodepth.so:对‘tensorflow::NewSession(tensorflow::SessionOptions const&)’未定义的引用 libmonodepth.so:对‘tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()’未定义的引用 libmonodepth.so:对‘tensorflow::Env::Default()’未定义的引用 libmonodepth.so:对‘tensorflow::TensorShapeRep::SlowCopyFrom(tensorflow::TensorShapeRep const&)’未定义的引用 libmonodepth.so:对‘tensorflow::internal::LogMessageFatal::~LogMessageFatal()’未定义的引用 libmonodepth.so:对‘tensorflow::Tensor::Tensor(tensorflow::DataType, tensorflow::TensorShape const&)’未定义的引用 libmonodepth.so:对‘tensorflow::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)’未定义的引用 libmonodepth.so:对‘tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()’未定义的引用 libmonodepth.so:对‘tensorflow::ConfigProto::~ConfigProto()’未定义的引用 libmonodepth.so:对‘tensorflow::Tensor::CheckTypeAndIsAligned(tensorflow::DataType) const’未定义的引用 collect2: error: ld returned 1 exit status CMakeFiles/inference_monodepth.dir/build.make:137: recipe for target 'inference_monodepth' failed make[2]: [inference_monodepth] Error 1 CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/inference_monodepth.dir/all' failed make[1]: [CMakeFiles/inference_monodepth.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

Can you help me? Thank you very much!