Closed rofinn closed 8 years ago
It is not possible as the code is, but it can be made to do so. @KDr2 do you have any insights in how the cmd-arguments can be passed on from the c-main function to julia?
I think the simplest method will work is to:
convert char** argv
to a Julia Array{UTF8String, 1}
, and then pass it to Julia, along with argc
Yeah, I think that pass char** argv
to julia's Base.ARGS
as a Array{UTF8String, 1}
works, I just proposed a PR: https://github.com/dhoegh/BuildExecutable.jl/pull/8 , Please have a try, review and test.
As #8 has been merged I will close this.
FWIW, the update works perfectly :) Thanks folks!
Sorry, if this is a dumb question, but is there any way to have the ARGS constant set at runtime rather than compile time? I have a script that takes cmd line args and when I compile my script my arguments are being ignored when I try to run it, I'm assuming because the ARGS constant is set at compile time and doesn't change at runtime?