I'm trying to compiling a shared library **.dylib for a third-party use. After using clang to compile the shared runtime library, when I try to dlopen it, it report an error like "unknown library ordinal -8 in **.dylib when binding "__ZNKSt13runtime_error4whatEv". It is trying to bind a libc++ ordinal, more details of it is
dyld chained import[81] = 0x003b10f8 lib_ordinal = 248 (libc++) weak_import = 0 name_offset = 7560 (__ZNKSt13runtime_error4whatEv)
__ZNKSt13runtime_error4whatEv may means "std::runtime_error::what() const "
Other dylibs is normal , only this one takes error. I don't known what will lead to this kind of error. libc++.1.dylib isn't loaded on this lib_ordinal(248 or -8)?
Any ideas? Thank you!