Now I know how I can compile c++ program and how to run it using Android App. My target is to same way compile it++ on NDK and access it++ programs through the Android app. I thought to copy the it++ latest source folder in to android NDK project jni folder and resolve compilations issues. I just want to know whether I'm in right direction or. Is there any best way I can achieve for this.
Many Thanks,
Suranga
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for excellent reply, DO you think my approach is correct, copying source and resolve compilation. Also I'll look in to compile blas, lapack, fftw in same way (copy source to jni folder).
Many Thnaks,
Suraga
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please read the help related to android cmake project above, then cross-compile an example. For compiling IT++, you need to use a command like:
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain
by default a shared library should be generated. Depending on the cross-compiling chain you might get some compilation errors as cross-compilation on Android is not officially supported.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear All,
I'm working on compiling it++ on android NDK. I started this with a sample app where it call twolibs
http://www.phonesdevelopers.com/1807681/
Now I know how I can compile c++ program and how to run it using Android App. My target is to same way compile it++ on NDK and access it++ programs through the Android app. I thought to copy the it++ latest source folder in to android NDK project jni folder and resolve compilations issues. I just want to know whether I'm in right direction or. Is there any best way I can achieve for this.
Many Thanks,
Suranga
Hi
You should use cmake in order to cross-compile for Android: https://code.google.com/p/android-cmake/
The main issue is to be able to get external libraries (blas, lapack, fftw) compiling and linking with IT++
regards
Bogdan
Last edit: Bogdan Cristea 2014-05-08
Hi Bogdan,
Thank you for excellent reply, DO you think my approach is correct, copying source and resolve compilation. Also I'll look in to compile blas, lapack, fftw in same way (copy source to jni folder).
Many Thnaks,
Suraga
You don't need to copy the sources. Just generate the shared or static library for your android platform, then copy it into your project.
Do you have any idea that how can I generate the shared or static library for the android platform. Kindly apologies I'm new for this area.
Many Thanks,
Suranga
Please read the help related to android cmake project above, then cross-compile an example. For compiling IT++, you need to use a command like:
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain
by default a shared library should be generated. Depending on the cross-compiling chain you might get some compilation errors as cross-compilation on Android is not officially supported.