We have an application working fine for Mac and Windows platform, now targeting for Android and iOS,
Application using libxml for parsing of XML data, and my question is ?
1 — Do i need to build libxml for Android platform or its already there as a part of NDK ?
if need to build any pointers how to start ?
You have two options:
Write an Android.mk that can successfully build libxml, and depend on the result of that in your main Android.mk. You can try to build libxml natively (using the configure script and make) on your Mac to get an idea of what files need to be built, and if any special flags need to be passed.
Or, Use libxml’s configure script and build libxml for Android using the NDK’s toolchain. You’ll have to do something like this:
Technically the host triplet for Android is
arm-linux-androideabi, but most configure scripts don’t recognize it, and for our purposes here,-gnueabiis close enough.I ended up suggesting
make libxml2.larather than justmakebecause the tests weren’t building properly. The resulting library will end up in the.libs/folder.The second method might be a little easier, but if you intend to build your app for multiple architectures (arm, armv7-a, maybe even x86 and mips), writing your own Android.mk will save you time in the long run.