I compiled a C project using the NDK and got many .a files which as I understand, they are nothing else than static libraries. I don’t know exactly what is the difference between .a and .so files but I wanted to ask: I know exactly that with a toolchain in NDK I can import all the .a files and get the .so file but having the .a files how to include the .a files in the .interface files to SWIG the whole library ?
Share
SWIG does not generate interface files from libraries. You can provide a wrapper to include all relevant header (
.h) files, or create the.ifile manually, only exposing the relevantCfunctions.Note that Android app cannot work with static libraries, you must build a dynamic library
.soto use JNI. You will callSystem.load()from your Java code to load this.sofrom disk.