Distribute the NDK library with gnustl?

I am developing a library for Android that has both Java and native components. The native library is dependent on the GNU STL. I contacted gnustl_static, but ran into a few strange problems that were resolved by reference gnustl_shared. (for example, the question File system and locale ). At the moment, I settled on gnustl_shared.

Here, where the question arises, it is expected that the consumer of my library will contact Native.so to add their own code. As I understand it, all C-runtimes should match.

  • The requirement of my clients to use gnustl_sharedseems that this may not work (as far as diplomacy and ease of integration are concerned)
  • If I create with gnustl_shared, the created JAR file contains libgnustl_shared.so, which causes a problem with creating an APK that also relies on this library. “I suppose I just can't include it in a JAR file?”
  • If I create against gnustl_static, avoid all these problems?
  • If my API contains references to STL objects (mostly std::stringand std::vector), will I run into problems if my clients do not use the GNU STL?

thank

+5
source share

All Articles