Reputation: 5314
I am building an application on Android using NDK and V8. I would prefer to use C++11 and GNU STL for features such as shared_ptr
; however, the V8 build system seems to be hardcoded to use stlport_static
as its STL variant.
Even when patching the build system to generate a fully self-contained library, V8's build does not statically link STLport into its .a files (which is to be expected), and thus I get hundreds of linker errors from unresolved symbols in libv8_base.a
et al. I also do not see any way to indicate to ndk-build
that it should link in stlport_static
when I am using a different STL variant.
Is there a reasonable pattern to linking in stlport_static
while using gnustl_static
, or, better yet, is there a way of building Android V8 against gnustl_static
instead?
Upvotes: 0
Views: 1096
Reputation: 57183
You have a problem. Well, mixing different STLs in separate .so's is possible, with extra care; but using two STLs inside one .so is simply impossible.
You either need to implement your own shared_ptr
(no big deal), but then you will face the same issue for every other feature that exists in gnustl and not in stlport.
Or you need to port V8 to gnustl (and I am afraid that the MIT license does not allow this).
Upvotes: 1