0

在我的 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",当我检查这个错误时,我在我的静态库中发现了这个依赖关系,它是使用 stlport_static 构建的。

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

4

1 回答 1

0

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

于 2016-11-16T01:00:40.203 回答