Search code examples
macosgtkddmd

Issue with GTK and D


OK, so I'm trying to experiment a bit with D and Gtk.

On OSX, I download the sources and did the typical make, sudo make install.

Now the Gtk sources are installed here :

/usr/local/include/d/gktd-2

However, when I'm trying to build one of the demos included (e.g. /demos/gtk/HelloWorld.d), with :

dmd -I/usr/local/include/d/gktd-2 HelloWorld.d 

The compiler still complains :

HelloWorld.d(24): Error: module MainWindow is in file 'gtk/MainWindow.d' which cannot be read
import path[0] = /usr/local/include/d/gktd-2
import path[1] = /usr/share/dmd/src/phobos
import path[2] = /usr/share/dmd/src/druntime/import

What am I missing?


UPDATE :

I think I got it to work, but it's one of those cases where I simply don't know how that happened... lol


Solution

  • To me it seems like a typo - /usr/local/include/d/gktd-2 seems incorrect. It should be something like /usr/local/include/d/gtkd-2 . Following should work: dmd -I/usr/local/include/d/gtkd-2 HelloWorld.d (note the change from "gktd" to "gtkd").