How to call Fortran functions from LuaJIT

  • From: Pedro Tabacof <tabacof@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 27 Nov 2014 14:58:09 -0200

Hello,

I'd like to know how to use the FFI to call a function from a Fortran 77
code. One way I see is to translate the code to C using f2c, but this is
far from ideal.

Calling Fortran from C code is simple, but you need to compile the o bject
file using a Fortran compiler such as gfortran (see
http://www.xgear.eu/callfortranfromc.html).

Is there an easy way to do this from LuaJIT?

Thank you,
Pedro.

-- 
Pedro Tabacof

Other related posts: