ubuntu上cpp的inference,make不成功
Created by: mingmmq
`CMakeFiles/detection_demo.dir/detection_demo.cpp.o: In function `__static_initialization_and_destruction_0(int, int)':
detection_demo.cpp:(.text+0x39e): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
detection_demo.cpp:(.text+0x441): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
libpaddleseg_inference.a(detection_predictor.cpp.o): In function `PaddleSolution::DetectionPredictor::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
detection_predictor.cpp:(.text+0xe9e): undefined reference to `paddle::AnalysisConfig::SetModel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libpaddleseg_inference.a(detection_predictor.cpp.o): In function `google::protobuf::internal::GetEmptyStringAlreadyInited[abi:cxx11]()':
detection_predictor.cpp:(.text._ZN6google8protobuf8internal27GetEmptyStringAlreadyInitedB5cxx11Ev[_ZN6google8protobuf8internal27GetEmptyStringAlreadyInitedB5cxx11Ev]+0x5): undefined reference to `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
libpaddleseg_inference.a(detection_result.pb.cc.o): In function `PaddleSolution::protobuf_AssignDesc_detection_5fresult_2eproto()':
detection_result.pb.cc:(.text+0x53): undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
libpaddleseg_inference.a(detection_result.pb.cc.o): In function `PaddleSolution::protobuf_AddDesc_detection_5fresult_2eproto_impl()':
detection_result.pb.cc:(.text+0x381): undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))'
libpaddleseg_inference.a(detection_result.pb.cc.o): In function `PaddleSolution::DetectionResult::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
detection_result.pb.cc:(.text+0x2d46): undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)'
libpaddleseg_inference.a(detection_result.pb.cc.o): In function `PaddleSolution::DetectionResult::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const':
detection_result.pb.cc:(.text+0x2ed9): undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)'
libpaddleseg_inference.a(detection_result.pb.cc.o): In function `PaddleSolution::DetectionResult::UnsafeMergeFrom(PaddleSolution::DetectionResult const&)':
detection_result.pb.cc:(.text+0x330a): undefined reference to `google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, google::protobuf::internal::ArenaStringPtr)'
libpaddleseg_inference.a(detection_result.pb.cc.o): In function `google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
detection_result.pb.cc:(.text._ZN6google8protobuf8internal14WireFormatLite10ReadStringEPNS0_2io16CodedInputStreamEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6google8protobuf8internal14WireFormatLite10ReadStringEPNS0_2io16CodedInputStreamEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1f): undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
libpaddleseg_inference.a(detection_result.pb.cc.o):(.rodata._ZTVN14PaddleSolution15DetectionResultE[_ZTVN14PaddleSolution15DetectionResultE]+0x20): undefined reference to `google::protobuf::Message::GetTypeName[abi:cxx11]() const'
libpaddleseg_inference.a(detection_result.pb.cc.o):(.rodata._ZTVN14PaddleSolution15DetectionResultE[_ZTVN14PaddleSolution15DetectionResultE]+0x58): undefined reference to `google::protobuf::Message::InitializationErrorString[abi:cxx11]() const'
libpaddleseg_inference.a(detection_result.pb.cc.o):(.rodata._ZTVN14PaddleSolution12DetectionBoxE[_ZTVN14PaddleSolution12DetectionBoxE]+0x20): undefined reference to `google::protobuf::Message::GetTypeName[abi:cxx11]() const'
libpaddleseg_inference.a(detection_result.pb.cc.o):(.rodata._ZTVN14PaddleSolution12DetectionBoxE[_ZTVN14PaddleSolution12DetectionBoxE]+0x58): undefined reference to `google::protobuf::Message::InitializationErrorString[abi:cxx11]() const'
collect2: error: ld returned 1 exit status
CMakeFiles/detection_demo.dir/build.make:131: recipe for target 'detection_demo' failed
make[2]: *** [detection_demo] Error 1
CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/detection_demo.dir/all' failed
make[1]: *** [CMakeFiles/detection_demo.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
确认已经下载安装了 fluid_inference, 路径的配置也是准确的。