I tried to compile Julie with my own package “FOO” with the help of script. I ran it with the following command line arguments.
julia.exe “C:/Julia-0.5.0/build_sysimg.jl” libBar core2 “C:/Julia-0.5.0/userimg.jl” --force
My userimg.jl looked like
using FOO
@Base.ccallable Float64 function jl_foo_fcn(vec1::Vector{Float64}, vec2::Vector{Float64})
return FOO.mape(vec1, vec2)
end
@Base.ccallable Int64 function jl_foo_model(cestaT::String, cestaR::String, pathC::String)
FOO.model(cestaT, cestaR, pathC)
return 0
end
After compilation I can not open the final libBar.dll in C with the help of julia.h. I get error in function jl_init_with_image()
Unhandled exception at 0x0000000064F3C4BA (libjulia.dll) in TIM.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000FEC0D33FF8).
How correct setup commands for compilation?
If I ran Julia from folder “JULIA_HOME/bin” with command
julia.exe -J libBar.dll --compile=no --precompiled=yes
it works with functions from userimg.jl.
But, how I should compile DLL which contains my package and was executable separately?
Thanks in advance,
Martin