Issue
I have a project which is reusing a native library (libocr.so) pre-compiled and for which I don't have source files. I manually put the library on libs/armeabi of my project and everything works perfectly.
Then I needed to create a new native library to the same project. I put my source code as weel as the Android.mk file in my jni folder and I build it with ndk-buld command. The library is build and placed in libs/armeabi folder, but libocr.so (the one manually added) is automatically deleted from there... How can I prevent libocr.so from being deleted?
Here is my Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libyuv
LOCAL_SRC_FILES := ycrcbutils.c
include $(BUILD_SHARED_LIBRARY)
Thanks in advance for any help, Luca.
Solution
...ok I found the answer by myself...
according to ndk/docs/PREBUILTS.HTML I changed my Android.mk like this:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_LDLIBS := -llog
LOCAL_MODULE := libyuv
LOCAL_SRC_FILES := ycrcbutils.c
include $(BUILD_SHARED_LIBRARY)
# Add prebuilt libocr
include $(CLEAR_VARS)
LOCAL_MODULE := libocr
LOCAL_SRC_FILES := libocr.so
include $(PREBUILT_SHARED_LIBRARY)
and placed a copy of my libocr.so under jni folder of my project.
Answered By - lviggiani
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.