简体   繁体   中英

Linking gnustl into Android ndk project with stlport_static

In my Android.mk and Application.mk , I am using a static library which is build using stlpot_static , but I want to use gnustl instead of stlport to build my project because I need support of c++11 in my project. Earlier I was using APP_STL := stlport_shared Application.mk in my and my project was running successfully. But now I want to make it APP_STL := gnustl_shared , the project compiles successfully but it crashes during run time giving me a error java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZNSt13_Filebuf_base12_M_page_sizeE" , when I checked for this error,I found this dependency in my static library which was build using stlport_static.

How can I use gnustl with my project without disturbing my static library which has its dependency on stlport_static.

您不能在单个二进制文件中混合和匹配STL: https ://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md#Using-Mismatched-Prebuilt-Libraries

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM