Sign up

Sample gtkD application not compiling.

The sample gtkD application (gtk-demo) does not want to compile, no matter what I try, I always get an error. However, when I just run it with dub, it works fine, so I'm assuming a dependency is missing, although I have not been able to figure out which one it is. Any help would be greatly appreciated.

The error I get when I try to compile:
Error: module 'MainWindow' is in the file 'gtk/MainWindow.d' which cannot be read
import path[0] = /usr/include/d
import path[1] = /usr/include/d/druntime/import

Re: Sample gtkD application not compiling.

Also forgot to mention, I am on Void Linux, if that makes a difference.

Re: Sample gtkD application not compiling.

On 21-04-2022 10:52, aarc wrote:

The sample gtkD application (gtk-demo) does not want to compile, no matter what I try, I always get an error. However, when I just run it with dub, it works fine, so I'm assuming a dependency is missing, although I have not been able to figure out which one it is. Any help would be greatly appreciated.

The error I get when I try to compile:
Error: module 'MainWindow' is in the file 'gtk/MainWindow.d' which cannot be read
import path[0] = /usr/include/d
import path[1] = /usr/include/d/druntime/import

You will need to include the source directory of GtkD in your dmd
commandline.

dmd source.d -I path/to/gtkD -L-Lpath/to/libgtkD -L-lgtkd-3 -L-ldl

If gtkD is installed on your system with make install or from the
package manager. you can use:

pkg-config --cflags --libs gtkd-3

To get the compiler flags needed to compile a gtkD application.

Re: Sample gtkD application not compiling.

Thanks!