'mlpack library error: undefined symbol architecture arm64
I have created iOS static library using mlpack C++ library using all dependencies and dependencies are armadillo, boost C++ library.
I have used to make the iOS static library mlpack c++, armadillo ,ensmallen and boost library.
Below are mlpack library link: https://github.com/mlpack/mlpack
I am using iOS static library into iOS project and call iOS static library C++ method function then found arm64 undefined symbol errors.
iOS static library always build successful. My iOS static library project structure snapshots: iOS static library project structure
When use iOS static library into iOS project found arm64 errors. Showing the boost serialization errors.
Below are error snapshots: Using iOS static library showing errors
typeinfo for boost::serialization::typeid_system::extended_type_info_typeid_0
Undefined symbol: boost::serialization::typeid_system::extended_type_info_typeid_0::is_less_than(boost::serialization::extended_type_info const&) const
Undefined symbol: boost::archive::detail::archive_serializer_map<boost::archive::binary_oarchive>::erase(boost::archive::detail::basic_serializer const*)
Undefined symbol: boost::archive::detail::archive_serializer_map<boost::archive::text_oarchive>::erase(boost::archive::detail::basic_serializer const*)
Undefined symbol: boost::archive::detail::archive_serializer_map<boost::archive::text_oarchive>::insert(boost::archive::detail::basic_serializer const*)
Undefined symbol: boost::archive::detail::basic_oserializer::~basic_oserializer()
Undefined symbol: boost::archive::detail::archive_serializer_map<boost::archive::xml_oarchive>::erase(boost::archive::detail::basic_serializer const*)
Undefined symbol: boost::archive::detail::archive_serializer_map<boost::archive::xml_oarchive>::insert(boost::archive::detail::basic_serializer const*)
Undefined symbol: boost::archive::detail::basic_pointer_oserializer::~basic_pointer_oserializer()
Undefined symbol: boost::archive::detail::basic_oarchive::save_pointer(void const*, boost::archive::detail::basic_pointer_oserializer const*)
Undefined symbol: boost::archive::detail::basic_oarchive::register_basic_serializer(boost::archive::detail::basic_oserializer const&)
Undefined symbol: typeinfo for boost::archive::detail::basic_oarchive
Undefined symbol: boost::archive::basic_binary_oarchive<boost::archive::binary_oarchive>::init()
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::end_preamble()
Undefined symbol: boost::archive::xml_oarchive_impl<boost::archive::xml_oarchive>::~xml_oarchive_impl()
Undefined symbol: boost::serialization::typeid_system::extended_type_info_typeid_0::extended_type_info_typeid_0(char const*)
Undefined symbol: boost::serialization::typeid_system::extended_type_info_typeid_0::type_register(std::type_info const&)
Undefined symbol: boost::serialization::extended_type_info::key_register() const
Undefined symbol: boost::archive::detail::basic_oserializer::basic_oserializer(boost::serialization::extended_type_info const&)
Undefined symbol: boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::__1::char_traits<char> >::save(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Undefined symbol: boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::__1::char_traits<char> >::init()
Undefined symbol: boost::archive::detail::archive_serializer_map<boost::archive::binary_oarchive>::insert(boost::archive::detail::basic_serializer const*)
Undefined symbol: boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::__1::char_traits<char> >::basic_binary_oprimitive(std::__1::basic_streambuf<char, std::__1::char_traits<char> >&, bool)
Undefined symbol: boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::__1::char_traits<char> >::~basic_binary_oprimitive()
Undefined symbol: boost::serialization::typeid_system::extended_type_info_typeid_0::is_equal(boost::serialization::extended_type_info const&) const
Undefined symbol: boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Undefined symbol: boost::archive::archive_exception::archive_exception(boost::archive::archive_exception const&)
Undefined symbol: typeinfo for boost::archive::detail::basic_oserializer
Undefined symbol: mlpack::math::randGen
Undefined symbol: typeinfo for boost::archive::archive_exception
Undefined symbol: boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::newtoken()
Undefined symbol: boost::archive::basic_text_oarchive<boost::archive::text_oarchive>::init()
Undefined symbol: boost::archive::detail::basic_oarchive::end_preamble()
Undefined symbol: boost::archive::archive_exception::~archive_exception()
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_end(char const*)
Undefined symbol: boost::archive::basic_text_oprimitive<std::__1::basic_ostream<char, std::__1::char_traits<char> > >::~basic_text_oprimitive()
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::tracking_type const&)
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_optional_type const&)
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_name_type const&)
Undefined symbol: boost::archive::archive_exception::archive_exception(boost::archive::archive_exception::exception_code, char const*, char const*)
Undefined symbol: boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::text_oarchive_impl(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, unsigned int)
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_type const&)
Undefined symbol: boost::archive::detail::basic_oarchive::save_object(void const*, boost::archive::detail::basic_oserializer const&)
Undefined symbol: typeinfo for boost::archive::detail::basic_pointer_oserializer
Undefined symbol: boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister()
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_reference_type const&)
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::object_reference_type const&)
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::version_type const&)
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_start(char const*)
Undefined symbol: boost::serialization::extended_type_info::key_unregister() const
Undefined symbol: mlpack::math::randUniformDist
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::object_id_type const&)
Undefined symbol: mlpack::Log::Fatal
Undefined symbol: boost::archive::detail::basic_oarchive::~basic_oarchive()
Undefined symbol: mlpack::Log::Warn
Undefined symbol: mlpack::util::PrefixedOutStream::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >& (*)(std::__1::basic_ostream<char, std::__1::char_traits<char> >&))
Undefined symbol: boost::serialization::typeid_system::extended_type_info_typeid_0::~extended_type_info_typeid_0()
Undefined symbol: boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::init()
Undefined symbol: boost::archive::xml_oarchive_impl<boost::archive::xml_oarchive>::xml_oarchive_impl(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, unsigned int)
Undefined symbol: mlpack::Timer::Start(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Undefined symbol: boost::archive::detail::basic_oarchive::basic_oarchive(unsigned int)
Undefined symbol: boost::archive::detail::basic_pointer_oserializer::basic_pointer_oserializer(boost::serialization::extended_type_info const&)
Undefined symbol: mlpack::Timer::Stop(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Undefined symbol: mlpack::util::PrefixedOutStream::operator<<(char const*)
Need some suggestions or any idea to fix the issues. Any type of help more appreciate able.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
