What is the behavior if an Android NDK application loads more than one common C ++ STL implementation?

We have an Android app with several native libraries. Currently, most of them use stlport_shared , but we are interested in updating to c++_shared (LLVM lib ++ runtime). If we updated some of them, but not others, we would have to download both stlport and llvm.

I suggested that loading two STL implementations might cause problems, but in practice, the application seems to work correctly. Is this behavior undefined or is it permissible to load more than one version of the STL?

I read https://developer.android.com/ndk/guides/cpp-support.html and part of the documentation that comes with the NDK but cannot find a final answer, Thanks for the help!

+4
source share
1 answer

It is better to avoid this, if at all possible.

If the STL type (for example, a std::string , for example) is available in both binary and binary < c++_static , since the two std::string implementations are incompatible, this will not work.

You are also vulnerable to the problems described by fooobar.com/questions/1604003 / ...

0
source

All Articles