繁体   English   中英

使用stlport_static将gnustl链接到Android ndk项目

[英]Linking gnustl into Android ndk project with stlport_static

在我的Android.mk和Application.mk中,我使用的是使用stlpot_static构建的静态库,但是我想使用gnustl而不是stlport来构建我的项目,因为我需要在项目中支持c ++ 11。 之前我在我的应用程序中使用APP_STL := stlport_shared Application.mk,并且我的项目已成功运行。 但是现在我要使其APP_STL := gnustl_shared ,项目成功编译,但是在运行时崩溃,给我一个错误java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZNSt13_Filebuf_base12_M_page_sizeE"在我检查此错误时java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZNSt13_Filebuf_base12_M_page_sizeE" ,我在我使用stlport_static构建的静态库中找到了这种依赖关系。

如何在我的项目中使用gnustl,而又不干扰依赖于stlport_static的静态库。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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