[英]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. 在我的Android.mk和Application.mk中,我使用的是使用
stlpot_static
构建的静态库,但是我想使用gnustl而不是stlport来构建我的项目,因为我需要在项目中支持c ++ 11。 Earlier I was using APP_STL := stlport_shared
Application.mk in my and my project was running successfully. 之前我在我的应用程序中使用
APP_STL := stlport_shared
Application.mk,并且我的项目已成功运行。 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. 但是现在我要使其
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构建的静态库中找到了这种依赖关系。
How can I use gnustl with my project without disturbing my static library which has its dependency on 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.