Created
March 31, 2019 04:45
-
-
Save terasakisatoshi/14f8fa8bab35683061306f96b1fcf96f to your computer and use it in GitHub Desktop.
Build Executable Julia Module including Plots.jl on Windows 10 via PackageCompiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dllpath=(julia -e 'using GR; s=joinpath(dirname(dirname(pathof(GR))),\"deps\",\"gr\",\"bin\"); s = s* \";\"; print(s)') | |
$Env:Path+=$dllpath | |
julia -e 'using PackageCompiler; build_executable(\"hello.jl\",\"hello\")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Hello | |
using Plots | |
function main() | |
xs = -π:0.01:π | |
p=plot(xs, sin.(xs)); | |
savefig(p, "sin_curve.png") | |
end | |
Base.@ccallable function julia_main(ARGS::Vector{String})::Cint | |
main() | |
return 0 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
License