Monday, 11 August 2014

error: cannot find -lsonivox



I copied libsonivox.so into /platforms/android-14/arch-arm/usr/lib/, my android.mk file is:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE    := midi
LOCAL_SRC_FILES := midi.c
LOCAL_LDLIBS    += -lsonivox
include $(BUILD_SHARED_LIBRARY)
but when I ran ndk-build I got this error:
.../ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsonivox

libsonivox.so can be loaded dynamically. You need to copy the .so from your android device and place it in $NDK-ROOT/platforms/android-14/arch-arm/usr/lib, "android-14" can be whatever version instead.

So I copied libsonivox.so to "android-18" and other "android-1X", and build it again, it worked!

No comments:

Post a Comment