0

I am very new to Android. Working on a small project where I need to run native code on Android x86. The project will need components from libsodium library.I need to cross compile the library and link it to an executable which will run on android.

So the first step is to cross compile libsodium.

I am using Ubuntu Linux. Have latest android SDK and NDK installed. Also have libsodium compiled and installed for Linux.

I tried doing some research but found no concrete solution. https://libsodium.gitbook.io/doc/installation gives the steps for ARM cross compilation but not X86.

I found one useful link which explains cross compilation for FFmpeg,

https://software.intel.com/en-us/articles/compiling-open-source-libraries-for-x86-android

But I am not sure whether the options given to configure will work for libsodium as well. Also is there a way I can do this using ndk-build or should I stick to configure script.

Can someone help me on this,i am stuck. Thanks in advance.

  • Possible duplicate of [Using libsodium in an android studio project](https://stackoverflow.com/questions/24997877/using-libsodium-in-an-android-studio-project) – elcuco Jul 30 '19 at 07:27