java - Link to shared library from Android library project with ndk-build -
i have android library project 'a', contains native c++ sources in 'a/jni' folder nicely build 'a/libs/armeabi-v7a/liba.so' , related other platforms.
i want make android project 'b' consists of java stuff more native c++ sources in 'b/jni' folder. these sources use code c++ library of project 'a'. have managed compile these fine setting
local_c_includes := (path_to_a/jni)
(i.e. picks header files project 'a').
the question: how link 'a/lib/armeabi-v7a/liba.so' in clean way?
i have read import_module documentation, seems geared towards situation in want link pure-ndk module, not library sits inside android library project.
first create module compile liba.so library prebuilt shared library in project b.
include $(clear_vars) local_module := liba local_src_files := path/to/liba.so include $(prebuilt_shared_library)
then, add module main module of project by:
local_shared_libraries := liba
i have never tried import_module option in project works in case.
Comments
Post a Comment