On Sunday, 30 August 2020 at 02:38:52 UTC, Kirill wrote:


I am trying to link the GTK library. I have the GTK Runtime installed on Windows 10 pc.


Unless things have changed in the last few years, GTK is not intended to be linked statically on Windows. You'll have to figure out how to compile it yourself as a static library. I recall reading about this a while back. IIRC, there were also some source changes required.

Then there's also the matter of licensing. GTK is released under the LGPL, which means if you statically link then your executable is considered a derivative work and must abide by the distribution terms of the LGPL.


Do I need to build the static GTK library from the source? Then how do I tell DUB to include that library?

DUB has a "libs" directive in the build settings:

https://dub.pm/package-format-sdl.html#build-settings
https://dub.pm/package-format-json.html#build-settings

Reply via email to