NDK: using user created .so when trying to build another .so
I'm trying to link some .so that I generated using the NDK to a new .so I'm trying to create, as the old .so contains definitions of functions that I want to use in the new .so.
I've tried this Android.mk :
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := prog_test
LOCAL_SRC_FILES := main.c
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES += mylib
include $(BUILD_SHARED_LIBRARY)
$(call import-module,<tag>) # with and without
I've also tried this method I found in stackoverflow NDK - How to use a generated .so library in another project but still no succes as I get always : prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lmylib.so
I really appreciate any help to solve this issue. BR
您必须使用include $(PREBUILD_SHARED_LIBRARY)而不是$(BUILD_SHARED_LIBRARY)
链接地址: http://www.djcxy.com/p/23376.html上一篇: 构建错误undefined引用'xx'