1

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. B.R

Community
  • 1
  • 1

1 Answers1

0

you have to use include $(PREBUILD_SHARED_LIBRARY) instead of include $(BUILD_SHARED_LIBRARY)

Hadj Ali Oussama
  • 784
  • 2
  • 8
  • 29