Hi guys,
We are trying to call a Fortan function (IGRF) from Windows. The fortan code is: https://www.ngdc.noaa.gov/IAGA/vmod/igrf12.f
(Actually many things are removed, we only need the igrf12syn
function)
We are compiling using mingw and the following commands:
gfortran -c igrf12.f
gfortran -shared -fPIC igrf12.o -o igrf12.dll
Finally, we try to open the library using:
path=joinpath(pwd(),"igrf12.dll")
dl=Libdl.dlopen(path)
However, the following error appears:
could not load library "E:\01 - INPE\igrf12.dll"
dlopen(::String, ::UInt32) at libdl.jl:97
dlopen(::String) at libdl.jl:97
include_string(::String, ::String) at loading.jl:522
include_string(::String, ::String, ::Int64) at eval.jl:30
include_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34
(::Atom.##100#105{String,Int64,String})() at eval.jl:75
withpath(::Atom.##100#105{String,Int64,String}, ::String) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:66
macro expansion at eval.jl:73 [inlined]
(::Atom.##98#103{Dict{String,Any}})() at task.jl:80
We have already tried different compilers, path, etc. but we could not call this library. In Linux, it works perfectly. Can anyone help us?
We are using Windows 7 and Julia v0.6.2.