Hi All,
I am trying to bind a fortran library for optimization
(http://napsu.karmitsa.fi/lmbm/) to Julia.
To do so, I would like to get a pointer to function written in Julia, which
I try to do as
function fOpt(x::Array{Float64,1},g::Array{Float64,1})
fill!(g,1.0);
convert(Cdouble,sum(x))::Cdouble
end
const fOptPtr = cfunction(fOpt, Cdouble, (Ptr{Cdouble}, Ptr{Cdouble}))
Though the call of cfunction return error:
*ERROR: cfunction: no method exactly matched the required type signature
(function not yet c-callable)*
* in cfunction at c.jl:9*
Can anyone suggest what I am doing wrong?
I use Julia Version 0.4.5 (2016-03-18 00:58 UTC) on OS X.
Thank you very much for help.
Tomas