Hello,
over there in julia-dev some enthusiasts show Gtk.jl in good shape and
useful.
Well, i'm still running into problems, i try to do the same thing, in 3
versions
1) execute file
lobi@maroon:~$ more .julia/Cairo/samples/example_gtk_function.jl
using Gtk
using Cairo
c = Canvas(256,256);
w = Window(c,"gtk/cairo example");
draw(c) do widget
cr = getgc(c)
set_source_rgb(cr,0,0,1)
paint(cr)
end
lobi@maroon:~$ julia/julia .julia/Cairo/samples/example_gtk_function.jl
ERROR: access to undefined reference
in getgc at /home/lobi/.julia/Gtk/src/cairo.jl:91
in anonymous at /home/lobi/.julia/Cairo/samples/example_gtk_function.jl:11
in draw at /home/lobi/.julia/Gtk/src/cairo.jl:60
in draw at /home/lobi/.julia/Gtk/src/cairo.jl:54
in include_from_node1 at loading.jl:120
while loading /home/lobi/.julia/Cairo/samples/example_gtk_function.jl, in
expression starting on line 10
2) include file on interactive julia
lobi@maroon:~$ julia/julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease+1174 (2014-01-23 16:58
UTC)
_/ |\__'_|_|_|\__'_| | Commit cda141d (2 days old master)
|__/ | i686-linux-gnu
julia> include(".julia/Cairo/samples/example_gtk_function.jl")
ERROR: access to undefined reference
in getgc at /home/lobi/.julia/Gtk/src/cairo.jl:91
in anonymous at /home/lobi/.julia/Cairo/samples/example_gtk_function.jl:11
in draw at /home/lobi/.julia/Gtk/src/cairo.jl:60
in draw at /home/lobi/.julia/Gtk/src/cairo.jl:54
while loading /home/lobi/.julia/Cairo/samples/example_gtk_function.jl, in
expression starting on line 10
-> opens the window and does the drawing
3) line-by-line entry
lobi@maroon:~$ julia/julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease+1174 (2014-01-23 16:58
UTC)
_/ |\__'_|_|_|\__'_| | Commit cda141d (2 days old master)
|__/ | i686-linux-gnu
julia> using Gtk
julia> using Cairo
julia> c = Canvas(256,256);
julia> w = Window(c,"gtk/cairo example");
julia> draw(c) do widget
cr = getgc(c)
set_source_rgb(cr,0,0,1)
paint(cr)
end
-> opens the window, without warnings/errors
Actually i'm expecting the same behaviour in all three cases.