I am working on linking Tensorflow2 shared libraries (*.so) files into my C++ program. The libtensorflow_cc and libtensorflow_framework.so use bazel-3.7.2 and gcc7.3 and is linked to another library I have ‘libmyproj.so’. I want to link this libmyproj.so to my main program which are built with the same gcc7.3. I have tried using the -D_GLIBCXX_USE_CXX11_ABI=0 flag for ABI compatibility (from https://www.tensorflow.org/install/source and Converting std::__cxx11::string to std::string) but without any success. I am stuck at the following error:
undefined reference to ml_model::ml_model(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
undefined reference to ml_model::preprocess_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<float, std::allocator<float> >, int&, int&, std::vector<int, std::allocator<int> >&)'
undefined reference to ml_model::get_predictions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > int, std::vector<int, std::allocator<int> >)'
in function std::__cxx11::basic_string<char, std::char_traits, std::allocator >* tensorflow::internal::MakeCheckOpString<long, int>(long const&, int const&, char const*)':undefined reference to tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()'
Any suggestions on why this is happening?
Aucun commentaire:
Enregistrer un commentaire