I am developing a library for Android which has both Java and Native components. The Native library depends on the GNU STL. I was linking against gnustl_static
, but have ran into a few strange problems that were resolved by linking gnustl_shared
. (for example the question Filesystem and locale). For the time being, I have settled on gnustl_shared
.
Here's where the question is -- the consumer of my library is expected to link against the Native .so to add code of their own. I understand from reading that all the C-runtimes must match.
- Demanding my clients use
gnustl_shared
seems like it might not work (as far as diplomacy and ease of integration goes) - If I build with
gnustl_shared
, the JAR file generated containslibgnustl_shared.so
, which causes a problem building an APK which also relies on this library. -- I suppose I can just not include it in the JAR file? - If I build against
gnustl_static
do I avoid all these problems? - If my API contains refernces to STL objects (mostly
std::string
andstd::vector
), will I face problems if my clients do not use GNU STL?
thanks