Menu

Compile IT++ on Android NDK

Suranga
2014-05-08
2014-05-08
  • Suranga

    Suranga - 2014-05-08

    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

     
  • Bogdan Cristea

    Bogdan Cristea - 2014-05-08

    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
  • Suranga

    Suranga - 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

     
  • Bogdan Cristea

    Bogdan Cristea - 2014-05-08

    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.

     
  • Suranga

    Suranga - 2014-05-08

    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

     
  • Bogdan Cristea

    Bogdan Cristea - 2014-05-08

    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.

     

Log in to post a comment.