Fortran编译器 [英] Fortran Compiler
问题描述
我正在Mac上开发一个Android应用程序。
有谁知道一个Fortran编译器的Android?
我打算从C例程中调用一些Fortran例程。然后用Java类包装C例程,并使用JNI来完成此操作。
但是,我无法编译Fortran代码。
我自己并没有尝试过,但人们已经成功地为Android构建了gfortran。见例如 http://specificimpulses.blogspot.com/2012/08/something -borrowed-android-fortran.html 和 http://danilogiulianelli.blogspot.com/2013/02/how-to-build-gcc-fortran-cross-compiler.html 。
如果您的C代码的唯一原因是包装Fortran代码,也许您可以使用ISO_C_BINDING(gfortran支持),并且直接使用JNI调用(使用ISO_C_BINDING,您可以在Fortran中使代码与ABI兼容与C)。
I am developing an android app on a Mac. Does anyone know of a fortran compiler for android??? I was going to call some fortran routines from a C routine. Then wrap the C routine with a java class and use the JNI to do this.
BUT, I can't get the fortran code compiled.
Haven't tried it myself, but people have successfully built gfortran for Android. See e.g. http://specificimpulses.blogspot.com/2012/08/something-borrowed-android-fortran.html and http://danilogiulianelli.blogspot.com/2013/02/how-to-build-gcc-fortran-cross-compiler.html .
If the only reason for your C code is to wrap the Fortran code, maybe you could instead just use ISO_C_BINDING (which gfortran supports), and have JNI call that directly (with ISO_C_BINDING you can make code in Fortran that is ABI compatible with C).
这篇关于Fortran编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!