I have a library that contains a significant amount of fortran code in it, which I want to build into my android application. Just running make fails, but that seems due to the android toolchain not supporting fortran. So, does anyone have experience getting this to work?
Asked
Active
Viewed 2,551 times
1 Answers
5
Ive never used it before but I googled ndk fortran and found this on a blog:
http://specificimpulses.blogspot.com/2011/10/android-fortran-step-by-step-part-3.html
It looks like it could be pretty promising.

James andresakis
- 5,335
- 9
- 53
- 88
-
This is the path I am started down. I googled this myself and originally only found step 1 and step 2 and the last sentence of step 2 made it sound like an incomplete approach. I also was hoping someone independently confirmed it worked for them. Regardless, I will report back how this goes. – corbin Jan 12 '12 at 16:14
-
followed the steps, but not clear is using $NDK/build/tools/make-standalone-toolchain.sh does the right thing after following these steps. – corbin Jan 14 '12 at 01:12
-
1--toolchain=arm-linux-androideabi-4.7.0 is the needed addition – corbin Jan 14 '12 at 01:19
-
1Yes, it is now working. Had to try it out. I have now built and tested BLAS and LAPACK on Android. Now onto something more ambitious. – corbin Jan 28 '12 at 20:37
-
Is there any particular reason you went with libraries in Fortran? Just curious.......for my own use Ive been using the eigen library in c++ and being my background is all c/c++ and java I just stuck with that when I needed a library to speed things up. – James andresakis Jan 29 '12 at 05:32
-
Open source code dependant on open source libraries written in fortran. Too much work to change. – corbin Jan 30 '12 at 07:02
-
Seems like rtti and exceptions are not working properly with this though. Ugh. Any thoughts? – corbin Feb 16 '12 at 21:04
-
They just release a new ndk build and in the release notes they mention something about the improvements helping with the handling of rtti problems. Try downloading the newest ndk and build it with that it could help. – James andresakis Feb 16 '12 at 21:07