• Advertisement
Sign in to follow this  
  • entries
    8
  • comments
    15
  • views
    8750

C++, the STL and the GPL

Sign in to follow this  

750 views

As I'm redoing the Nehe SDK for the updated site, I've been looking into the libraries I can use without licensing problems - in other words licences that won't restrict the use to which the SDK can be put. Viral licenses such as the GPL are therefore a no no. I don't have a personal problem with the GPL, but as a commercial developer I have to know the legal consequences of every third party code I use.

This reminded me of a problem that few developers seem to be aware of - libstdc++, the Standard C++ library that ships with gcc is GPL. Most people think that like glibc, it is LGPL. Therefore, whenever you use the standard library in a normal gcc environment (linux, mingw, cygwin, etc), your application automatically falls under the GPL.

Fortunately there is a way around it, as well as standardizing your application to a single Standard Library. This is the well known STLPort which has a simple "as is" free license. This standardization also sorts out the STL problems with pre-Visual Studio .net.

Hopefully updating the SDK will help me write more in this journal, as my present position isn't especially game related at the moment [sad].
Sign in to follow this  


2 Comments


Recommended Comments

Interesting, I never realised that thing about things being built with gcc potentially all having the viral gpl assigned to it.

Share this comment


Link to comment
libstdc++ v3, which became the official default C++ standard library for gcc in November 2000 and I believe is used in all gcc versions from 3.0 upwards is licensed under the GPL with the runtime-exception. This does not infect compiled programs with the GPL. The licensing details can be found here.

Σnigma

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement