linking on Linux / licenses
Mart Raudsepp
leio at dustbite.net
Sun Aug 5 21:30:52 PDT 2007
On E, 2007-08-06 at 02:54 +0200, Vadim Zeitlin wrote:
> On Sun, 05 Aug 2007 22:10:47 +0200 Torsten Mohr <tmohr at s.netic.de> wrote:
>
> TM> if i want to distribute a program that is based on wxWidgets
> TM> then basically the GNU L-GPL applies, if i understand the
> TM> wxWindows Library License 3.1 correctly, is that right?
>
> Almost: wx licence is actually requires less than LGPL.
>
> TM> Is it then correct that i need to supply the object files
> TM> of my program, so others can re-link them against a new
> TM> version of wxWidgets (assumed that i link statically)?
>
> No, this is the wxWidgets static link exception.
>
> TM> In the wxWidgets-Book it is also mentioned that due to
> TM> different versions of Linux distributions and different
> TM> versions of installed GTKs programs may not start up
> TM> correctly on other users PCs.
>
> I think the problem might be much less acute now. And, anyhow, it's a very
> bad idea to statically link to GTK+ (please search the list archives for
> many threads about it).
Exactly. Plus if you statically link to GTK+ then your application must
have the possibility to re-link them against a new version of GTK+ as
you thought might be necessary for wxWidgets (unlike wxWidgets, GTK+ is
pure LGPL without the static link exception), IANAL.
How it's less a problem these days is that I and others have gone to the
trouble of supporting lower GTK+ versions on runtime than was used on
compile-time. So my suggested way is to use as new stable GTK+ version
as possible for building your binaries, and making sure that lazy symbol
binding is used on the deployed system - then your program will also
work on systems that have only GTK+-2.4, for example. wxGTK compiles in
fallback code for older versions and if the runtime version is too low
for using a new GTK+ feature, then fallback code is used instead and it
still runs. The lazy binding of symbols is very important for this to
function.
Regards,
Mart Raudsepp
More information about the wx-users
mailing list