简体   繁体   中英

Android NDK can't find stlport

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

OK I had forgotten to specify:

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

in the Android.mk file

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

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