[cffi-devel] Linking to fortran
Mark Hoemmen
mark.hoemmen at gmail.com
Wed Sep 2 04:40:34 UTC 2009
On Tue, Sep 1, 2009 at 14:28, Mirko Vukovic<mirko.vukovic at gmail.com> wrote:
> ;; I got the trailing underscore by using `nm' on the library.
> (defcfun "test_link_" test-link (a :float)) ; (b :float) (i :int))
Fortran passes by pointer ("by reference" is the proper way to call
it, unless you're a C programmer) unless the Fortran subroutine /
function specifically tags the variable as a "value" type. You're
not, so a, b, and i should all be pointers in the above defcfun.
mfh
More information about the cffi-devel
mailing list