Android NDK can't find stlport

主宰稳场 提交于 2020-01-14 14:09:44

问题


I'm trying to compile a native library (derived from WebRTC) by using android NDK rev8b. I get the following error:

android_ndk/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: cannot find -lstlport_static

So it can't find the stl library.

I have installed libmagic-dev.

The version of the distribution (as returned by /proc/version) is:

Linux version 2.6.32-40-generic (buildd@yellow) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #87-Ubuntu SMP Tue Mar 6 00:56:56 UTC 2012

EDIT I have the same problem with the revision 8d


回答1:


OK I had forgotten to specify:

LOCAL_LDLIBS := -L/ndk-path/sources/cxx-stl/stlport/libs/armeabi

in the Android.mk file




回答2:


See http://docs.huihoo.com/android/ndk/r5/CPLUSPLUS-SUPPORT.html

You must set in your Application.mk, for example:

APP_STL := stlport_static

or stlport_shared



来源:https://stackoverflow.com/questions/14322103/android-ndk-cant-find-stlport

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!