On Wed, 31 May 2017 22:22:15 +0200, Mike Wey wrote:

It looks like you are using the 64bit version of the Gtk Runtime, did
you compile gtkD and the executable as 64bit?

I made an error in copying the error text. The DLL is not in:
C:\Program Files\Gtk-Runtime\bin\libfontcongif-1.dll
But in:
C:\Program Files (x86)\Gtk-Runtime\bin\libfontcongif-1.dll

Both of those directories exist though, I installed both the 32-bit version and the 64-bit version of the runtime. I also tried to compile both the 32-bit and 64-bit version, I don't know which version dub uses.

Trying manual again

I uninstalled the 64-bit runtime, cloned the repo and built without the -m64 flag. The build was successful this time, but I'm not sure about this step:

4. Copy GtkDExtractionDir\src to dmddir\src\gtkd

I copied the src folder from C:\D\GtkD\src\, but it says:

dmd hello.d -Lgtkd.lib
hello.d(1): Error: module MainWindow is in file 'gtk\MainWindow.d' which cannot be read
import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
import path[2] = C:\D\dmd2\windows\bin\..\..\src\gtkd

MainWindow.d is in C:\D\GtkD\generated\gtkd\gtk which I didn't copy, so I copied \generated\gtkd\ as well. I replaced the files that were in conflict with the already existing files. Running dmd hello.d -Lgtkd.lib gives:

OPTLINK : Warning 9: Unknown Option : NOIGTKD.LIB
hello.obj(hello)
 Error 42: Symbol Undefined _D3gtk5Label5Label6__ctorMFAyabZC3gtk5Label5Label
hello.obj(hello)
 Error 42: Symbol Undefined _D3gtk10MainWindow10MainWindow7__ClassZ
hello.obj(hello)

Demos

I tried dub run --build=plain on the demos in the repo:

DemoActions: The function you are calling is not pressent in your version of GTK+.
DemoCustomList: ..\..\..\generated\gtkd\gtkd\Implement.d(351,2): Warning: statement is not reachable
DemoMultiCellRenderer: works
DemoMultithread: works
TestWindow: works, but outputs errors:

failed (libatk-1.0-0.dll) atk_document_get_current_page_number
failed (libatk-1.0-0.dll) atk_object_get_object_locale
(...) ~1700 lines
failed (libpango-1.0-0.dll) pango_renderer_get_alpha
failed (libpango-1.0-0.dll) pango_renderer_set_alpha

(TestWindow.exe:6516): Gtk-CRITICAL **: gtk_menu_attach: assertion 'left_attach < right_attach' failed

(...) more such errors after interacting with widgets