I downloaded gtkD-1.5.1
and extracted to some gtkD
directory. What do I do next ? I don't understand if I have to compile and link it to some lib or just link to it in my code ?
Edit: (@dsimcha)
the command dsss build
in gtkD main dir gave me this:
Could not detect versions.
Could not detect versions.
Could not detect versions.
Could not detect versions.
Could not detect versions.
undemofy
Could not detect versions.
Could not detect versions.
atk => DO-atk
cairo => DO-cairo
gdk => DO-gdk
gdkpixbuf => DO-gdkpixbuf
gio => DO-gio
glade => DO-glade
glib => DO-glib
gobject => DO-gobject
gthread => DO-gthread
gtk => DO-gtk
gtkc => DO-gtkc
pango => DO-pango
but no lib was created ?
I had problems using DSSS on Windows as well, you could try using Bud/Build.
Make sure that build.exe is in your path somewhere, then open a command line in your gtkD/src/build folder. Then run build gtkD.brf
to create GtkD.lib
.
Depending on your version of DMD, you'll get a lot of errors. Most of the ones I got was typedef being deprecated. Any file where that happened (it will tell you) I simply refactored typedef into alias, and it worked fine. The other error I got was with src/gtk/Toolbar.d
, and an ambiguous virtual function getOrientation()
. To fix this, go into src/gtk/OrientableIF.d
and /src/gtk/ToolShellIF.d
and comment out the getOrientation methods.
Using the most recent version of dmd (2.059), glib/DateTime.d
won't compile. To make this file compile, simply comment out the method override hash_t toHash()
.
When you compile your project, use dmd <source files> -L <C:\Path\To\File>\GtkD.lib
Imanage to use GtkD without generating lib files, with rdmd.
rdmd will autobuild GtkD and your project code alone, skipping the need to making libs and linking it manually.
You need to compile gtkD into a binary. The standard way to do this is with DSSS. Basically, download and install DSSS, and then do a dsss build
from the main gtkD directory.
Edit:
After you build gtkD using DSSS, you'll have a bunch of .lib files in the gtkD directory. You statically link these into your application. In addition, you need to have the GTK+ libraries installed in your Windows installation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With