[SDL] Re: Yet more probably OT LGPL questions and comments.

Jeremy Peterson jeremy at phantomefx.com
Thu Apr 6 04:53:57 PDT 2000

Pierre Phaneuf wrote:

> Jeremy Peterson wrote:
> > Further pursing license compliance, I've determined that I can't use the
> > stdc++ library, because it is licensed under the GPL and I can't
> > distribute an application that links to both a GPL and an LGPL'd library
> > because it creates an impossible legal situation. I'm using the stlport
> > library as a replacement ( Highly recommended BTW, it makes compile
> > times go though the roof, being a template library, but performance and
> > standards compliance is there. )
> Huh? Doesn't the stdc++ library has a special allowance for binaries
> created with gcc? I think Netscape Communicator is in C++, for instance.
> Statically linked.
> --
> Pierre Phaneuf
> Systems Exorcist

I've looked into that and you are correct. There is a special exception:

As a special exception, if you link this library with files compiled with GCC
to produce an executable, this does not cause the resulting executable to be
covered by the GNU
General Public License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General Public

>From the g++ FAQ:

To avoid coming under the influence of the LGPL, you can link with
`-liostream' rather than `-lg++' (for version 2.6.x and earlier), or
`-lstdc++' now that it is available. In
version 2.7.0 all the standard classes are in `-lstdc++'; you can do the link
step with c++ instead of g++ to search only the `-lstdc++' library and avoid
the LGPL'ed code in

Thanks for the info! I've been having a few problems using stlport's new
iostreams library with mingw32, so its great that I can use those particular
portions of stdc++ in particular.

More information about the SDL mailing list