Dub and GtkD

qznc qznc at web.de
Sat Dec 21 14:19:25 PST 2013


On Saturday, 21 December 2013 at 14:52:08 UTC, Russel Winder 
wrote:
> I just created a new vibe.d project using dub, all fine. Well 
> once I had
> solved the libevent problem. Then, as the project is to be a 
> GUI client,
> I added a gtk-d dependency.  I tried building the empty project 
> and the
> binary comes out at 42MB. Not only that there are two copies of 
> it one
> in . and one in ./.dub/build. I was gobsmacked, this isn't Go, 
> there
> should be dynamic linking by default.  Is this something I have 
> missed?
>
> There ought to be a clean target for dub as well as a build and 
> run
> target for dub, or have I missed something?
>
> Re GtkD, when I run the "Hello World" vibe.d web server with 
> GtkD doing
> nothing, I get:
>
>
> |> dub
> Checking dependencies in 
> '/home/users/russel/Repositories/Git/Masters/ArcamClient_D'
> Target is up to date. Skipping build.
> Running ./arcamclient
> Listening for HTTP requests on ::1:8080
> Listening for HTTP requests on 127.0.0.1:8080
> Please open http://127.0.0.1:8080/ in your browser.
> object.Exception at ../../../../.dub/packages/gtk-d-master/src/gtkc/Loader.d(127): 
> Library load failed: libgtkglext-3.0.so.0
> Error: Program exited with code 1
>
>
> In an earlier thread here, Mike Wey's response was "download 
> libgtkglext
> and build it yourself". I am not sure this is the right 
> approach. Debian
> packages GNOME 3 quite well but they do not have this
> libgtkglext-3.0.so.0 and yet things work. I think mayhap GtkD 
> should
> have this as an optional dependency rather than a mandatory 
> one. Or am I
> missing something?

For some reason GtkD uses some unreleased version of Gtk with 
some OpenGL features. You can use the "normal/stable" variant by 
adapting your dependency a little:

"dependencies": { "gtk-d:gtkd": "~master" }

Not sure, why GtkD does this. There are also no versions, just 
"~master".


More information about the Digitalmars-d-learn mailing list