问题
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