I have created a static library (with extension .a) for iOS with Xcode. These were my build-settings:
A check with lipo -info libassimp.a approves:
Architectures in the fat file: libassimp.a are: armv6 armv7
Can I use this static .a-library in an Android NDK project as well? Do I have to add supported platforms? Or do I have to build it seperately on Android?
Furthermore, I need libz.dylib which is a preinstalled library on iOS - actually libassimp.a needs libz.dylib. Is it also available on Android, and would it be possible to use libassimp.a without modifications on Android in this case?
You need to separately compile the library for Android platform. A simple example of compiling C-C++ sources for Android platform is given in the link below
http://tariqzubairy.wordpress.com/2012/03/09/arm-binaries-static-library-for-android/
For using the already pre-build version of any library on Android you just need to add a local module in your Android.mk file as given in the link below
http://tariqzubairy.wordpress.com/2012/03/12/use-of-prebuild-static-library-compiled-with-android-toolchain/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With