[Qt-interest] LGPL and static linking

andrew.m.goth at l-3com.com andrew.m.goth at l-3com.com
Wed Dec 2 18:50:33 CET 2009


Bastian Bense wrote:
> I guess the .a format is, unlike shared libraries, not 
> compatible with every linker.

It is as compatible as shared libraries are, which is to say, that it is also not compatible with every linker.  Sure, every modern linker supports shared libraries, same as static libraries, but the formats can differ between toolchains, operating systems, and architectures.

The .a format is just an "ar" archive of .o files; it is a static library.  It's possible (but cumbersome) to use the .o files directly.  In principle, the same functionality exists on all platforms, using possibly different formats.

> So the user would need the exact version of the toolchain to be 100% 
> sure that re-linking will go smooth.

Bundle that too.  Just throw in a statically-linked GNU ld. :^)

> Why not simply provide the user two download options when 
> downloading your application (except, of course, for those 
> cases where it is technically impossible): a dynamic version 
> (possibly hidden somewhere between the links on the download 
> page), and the static variant.

If I understand correctly, the difficulty is in convincing a lawyer that the statically-linked version does not embed a modified Qt.  Including a dynamic version for comparison doesn't really help.  As far as I know, keeping the application and the library separate is the only safe way to go.  Dynamic linking requires this separation anyway.

-- 
Andy Goth
<amgoth at link.com>




More information about the Qt-interest-old mailing list