This works fine with g++, but fails with clang. Both under Ubuntu 22.04.
plugin.so exports a function named:
plugin::InitPlugin(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
However it looks like import_mangled under clang is looking for a function named:
plugin::InitPlugin(std::basic_string<char, std::char_traits, std::allocator > const&)
Notice that the namespace __cxx11 is missing.
It seems to come from a difference between how __PRETTY_FUNCTION__ is implemented in g++ and clang.
I have a plugin.so file with the following function:
I am trying to load the function using import_mangled. I am aware that it is experimental.
This works fine with g++, but fails with clang. Both under Ubuntu 22.04. plugin.so exports a function named: plugin::InitPlugin(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
However it looks like import_mangled under clang is looking for a function named: plugin::InitPlugin(std::basic_string<char, std::char_traits, std::allocator > const&)
Notice that the namespace __cxx11 is missing.
It seems to come from a difference between how
__PRETTY_FUNCTION__
is implemented in g++ and clang.