D Binding to GUI libraries [was Interesting Observation from JAXLondon]

tide tide at tide.tide
Sat Oct 20 12:43:37 UTC 2018


On Saturday, 20 October 2018 at 09:25:58 UTC, Russel Winder wrote:
> On Sat, 2018-10-20 at 08:52 +0000, Gregor Mückl via 
> Digitalmars-d wrote:
>> 
> […]
>> I periodically look at how I can make use of D for small 
>> projects. Most often, I shy away because I want to build a GUI 
>> and none of the libraries that I can find look mature and well 
>> maintained enough to put my faith in. For C++ there's Qt, 
>> which is *phenomenally* good (despite some warts), but there's 
>> been at least half a dozen attempts at creating D bindings for 
>> that, all in various states of completion/negligence.
>
> GtkD works very well for me. But I guess GTK+ has a reputation 
> of not working on Windows and macOS. Once a reputation is 
> established it is nigh on impossible to refute.

Last time I tried to use GTK on windows I had to build i from 
source myself, from the looks of it that hasn't changed. It has a 
huge dependency list, and some of those dependencies have their 
own dependencies. They all have to be built their own different 
way on Windows. It's a pain in the ass to do, i tried and didn't 
bother after trying to compile cairo or whatever. Kind of odd 
they don't have any sort of build script, I guess they just use 
Mingw which not very many people use.

It may work on Windows, but the amount of effort to set it up is 
not worth it at all. The developers of the library obviously 
don't care enough either to try to reduce that barrier. Why not 
provide a built shared library? Something tells me they haven't 
even bothered to compile it with MSVC themselves. Their guide to 
build with MSVC links to a 3+ year old Gnome article where 
someone not even affiliated with GTK wrote a powershell script to 
build it with MSVC. The other links to an article that is still 
using VS 2010 and 2008 for the build.

I mean it *may* work, but that isn't the problem if the 
developers completely lack support for the platform. I can 
download Qt with prebuilt libraries and it works out of the box 
with MSVC. There's an obvious difference between the two 
developers support. As someone else said GTK look like ass on 
Windows, Qt is really the only crossplatform GUI API written in a 
native-compile-able language out there that gets most things 
right.




More information about the Digitalmars-d mailing list