Search code examples
linkerapportable

How to link C/C++ static library built for Android in Apportable?


This is related to my previous question.

If I have some C/C++ static library which is pre-built for Android, can I link it to my application with Apportable build tools? If it is possible, how can I do that?

Or should I re-build any library to use with Apportable?


Solution

  • Static libraries can be linked, there is an additional flag in the configuration.json that can be modified in the add_params section that will allow for static libraries to be added.

    "libs": [ "path/to/the/lib.a" ]

    Dynamic libraries can be done in the same manner, however these can definitely cause issues with linkages to our extensions to libc. For example this would prevent that .so from using our optimized malloc implementation, or our virtualized file system accessors etc.