I use the GNU gfortran compiler (on Cygwin) for my own module. A good example, we hope, will start from the compilation stage, will cause malformed names and will call the routine from Julia through ccall. Most of the examples I've seen skip the first two steps.
So imagine that I have the following module in a Fortran 90 file called "f90tojl.f90":
module m
contains
integer function five()
five = 5
end function five
end module m
This example is given from here . I compile it using gfortran as follows to create a shared library:
gfortran -shared -O2 f90tojl.f90 -o -fPIC f90tojl.so
And my admittedly shaky understanding from reading Julia docs suggests that I would have to name function five like this:
ccall( (:__m_MOD_five, "f90tojl"), Int, () )
. 'error compiling anonymous: could not load module f90tojl.... - ? , - .
doc C. this ++. R Python - Cython Rcpp - , C/++. , Fortran vs Julia C/++.