On 09-06-2019 21:52, boqsc wrote:
Hello, I'm running Ubuntu 19.04,
I would like to see a working gtkD example on my system finally.However it seems it is not that simple as just:
- sudo snap install --classic dmd
- apt-get install libgtkd-3-dev
- And running some examples from
http://www.dsource.org/projects/gtkd/wiki/CodeExamples
rdmd hello.d
What I'm missing and how should I setup for the examples to run correctly?
Right now I'm getting
vaidas@vaidas-SATELLITE-L855:~$ rdmd hello.d hello.d(1): Error: module `MainWindow` is in file 'gtk/MainWindow.d' which cannot be read import path[0] = . import path[1] = /snap/dmd/62/bin/../import/druntime import path[2] = /snap/dmd/62/bin/../import/phobos Failed: ["/snap/dmd/62/bin/dmd", "-v", "-o-", "hello.d", "-I."]
The gtkd package in the debian/ubuntu repository is compiled with ldc,
this means your GtkD application also needs to be compiled with ldc.
To compile the application while passing the correct flags to the
compiler you can use pkg-config:
ldc2 `pkg-config --cflags --libs gtkd-3` hello.d
The call to pkg-config
would expand to:
-I/usr/include/d/gtkd-3/ -L-lgtkd-3 -L-ldl