Android ndk reference12/2/2023 (Also, when building for android on arm, it doesn't seem to allow you to pick which android version you're targeting, so if your NDK contains android-21, it seems that it will try to build with that, which can also give you similar errors, such as in Cannot load library: reloc_library: cannot locate 'rand'.) (On Android versions prior to 5.0, the rand function in stdlib.h is an inline function that actually maps to the lrand48 function, which is what the binary ends up linking to). Instead it builds pretty much as usual, using the normal system compiler, with the normal system headers (unless you manually specify them), which contain a normal rand function, which isn't available on Android. (In fact, if you compile with -target=x86-android-gcc on OS X, it doesn't even build linux/android binaries, it will end up building a binary for OS X.) It seems that when configuring libvpx with -target=x86-android-gcc, it actually doesn't automatically pick an android compiler or try to use android headers (contrary to what it does for armv7-android-gcc). $(call import-module,android/cpufeatures)Ĭontrary to the initial impression (from the subject), this isn't (directly) a duplicate of Cannot load library: reloc_library: cannot locate 'rand'. (plib/Android_x86.mk) LOCAL_PATH := $(call my-dir) Include $(LOCAL_PATH)/./plib/Android_x86.mk (jni/Android.mk) LOCAL_PATH := $(call my-dir) Libvpx.a for armeabi didn't occur an error. C:/android//jni/./plib/libvpx.a(postproc_)(.text+0x1c8): error: undefined reference to 'rand'Ĭ:/android//jni/./plib/libvpx.a(postproc_)(.text+0圆5c): error: undefined reference to 'rand'Ĭollect2.exe: error: ld returned 1 exit status When I use this library is by ndk-build on Windows, an error occurred. I built the library by following command and got "libvpx.a"./configure -target=x86-android-gcc -disable-vp8-encoder -disable-vp9-encoder -disable-examples -sdk-path=$ANDROID_NDK_ROOT -enable-pic -enable-postproc I'm trying a webm decorder for Android x86 with libvpx.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |