How to build MLPack library as a static library using NDK-build?

144 views Asked by At

Can I build a library like mlpack which has only .hpp file as a shared library using NDK-Build? I am trying to build an API using ndk-build from linux for android arm64 and armeabi-v7a. But my API has a dependency on mlpack. But I can't use the libmlpack.so that I have built in my development environment as it was built in my desktop linux environment.

ld: error: ~/jni/lib/libmlpack.so is incompatible with aarch64linux

So, I was wondering if I could build the libmlpack.so for arm64 by using the library's source files. The following is the git repo for mlpack:

https://github.com/mlpack/mlpack

I was able to build boost library for android using the following git repo which seems to work fine.

https://github.com/moritz-wundke/Boost-for-Android

0

There are 0 answers