FeedSpot Recognizes the GtkDcoding Blog

Les De Ridder les at lesderid.net
Fri Feb 7 21:00:10 UTC 2020

On Friday, 7 February 2020 at 19:51:52 UTC, Andre Pany wrote:
> On Friday, 7 February 2020 at 18:16:37 UTC, Les De Ridder wrote:
>> On Friday, 7 February 2020 at 14:23:58 UTC, Andre Pany wrote:
>>> [...]
>>> Now the sad part. I would like to use GtkD at work but I 
>>> can't. The license is really dangerous for companies (you 
>>> compile lGpl source code into your application), therefore it 
>>> is a complete no go from the IP department. The license is a 
>>> huge blocker for GtkD commercial usage.
>> I'm not sure why LGPL is an issue. Does GtkD not allow dynamic 
>> linking?
> I am not an expert at all in the topic of licensing. This is my 
> understanding:
> Gtk has the license lgpl. As long as you link dynamically to 
> the shared object files, you can use it in commercial products.
> GtkD is a D wrapper for GTK. It is D source code which ease the 
> access to the C api of Gtk. GtkD has also the license lgpl. To 
> use GtkD in my application I have to statically link the D 
> source code.
> Now it gets more complicated, GtkD has some additions to the 
> lgpl rules.
> I cannot judge how high the risk is for companies to use this 
> component, but as an employee I do anything to avoid any risk 
> for the company I work for.
> Kind regards
> Andre

GtkD's COPYING file contains the following:

> 2. Static linking of applications or any other source to the 
> GtkD
> library does not constitute a modified or derivative work and 
> does not
> require the author(s) to provide source code for said work, use 
> the
> shared GtkD libraries, or link their applications against a
> user-supplied version of GtkD.

Looking at the GtkD code, it seems much of it was written in a way
specifically to avoid licensing issues, e.g. by loading libraries 
populating function pointers at runtime[1][2]. I'm not sure it 
*supports* static linking with GTK libraries.

I compiled one of the GtkD examples[3] on Linux with dub, and was 
to confirm with `ltrace` that it indeed loads the GTK libraries at
runtime using `dlopen` when compiling with the default 


More information about the Digitalmars-d-announce mailing list