我试图通过使用android编译一个本机库(从WebRTC派生)。我得到以下错误:
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所以它找不到史特尔图书馆。
我安装了libmagic-dev。
发行版(由/proc/version返回)的版本是:
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编辑i与8d版本有相同的问题
发布于 2013-01-14 17:45:51
好的,我忘了指定:
-L/ndk-path/sources/cxx-stl/stlport/libs/armeabi LOCAL_LDLIBS :=
在Android.mk文件中
发布于 2013-01-14 17:47:23
请参阅http://docs.huihoo.com/android/ndk/r5/CPLUSPLUS-SUPPORT.html
例如,必须在Application.mk中设置:
APP_STL := stlport_static或stlport_shared
https://stackoverflow.com/questions/14322103
复制相似问题