The GNU GPL Virus

If you are just an average Joe who just wishes to use GNU GPL (General Public License) licensed software, you have nothing to worry about. However, if you are a developer, stay far far away from any software licensed under the GNU GPL.

Let’s say you are developing a video game that you may wish to sell for a profit some day. You have your game up and running great, but you want to make it much more realistic by adding dynamic physics, like you see in games such as Half-Life 2. After researching, you find a great physics library you want to use so you don’t have to spend months learning physics to write your own. Unfortunately, the physics library’s license is the dreaded GNU GPL. If you were to integrate the physics library into your application, all of the source code that you have written all by yourself is suddenly GLP-ed and you MUST release the source code for free! Like a virus, the GNU GPL spreads across all code attached to anything licensed under the GPL! You can still sell your game of course, but anyone who wishes to get it for free can do so by downloading your game’s source code that you were required to freely release, compiling it, and running it themselves. Obviously, this results in a loss of sales.

Don’t get me wrong, there’s nothing wrong with releasing your source code. Perhaps you wish to sell your application for a few years, then release the source code for free when it gets old and sales decline or stop all together – much like id software did with Quake and Doom.

Not all off the GNU licenses are bad though, just stay away from specifically the “GPLv2,” “GPLv3,” and so on. Two specific variants, the LGPL and the GPL+CE, are fine to use.

The LGPL is merely OK because it allows you to dynamically link (not statically) a library licensed under the LGPL and not have to release your source code. However, it allows anyone to legally reverse-engineer your software for “debugging and such modifications.” The LGPL is unsuitable for mobile devices such as the iPhone where you must statically link everything together into one single binary. If you are just targeting desktop computers where you are able to get away with dynamically linking the LGPL library, and you don’t care about hackers legally reverse-engineering your software, the LGPL is OK.

Probably the best GPL-ed software is going to be licensed under the GPL + Classpath Exception. This version of the GPL adds a special exception clause which allows linking (static or dynamic) to the library and releasing the combined application under your own licensing terms. This means you can simply use the free library in your project without having to worry about your software having “GPL compatible licensing” or releasing your source code for free. This is exactly how it should be, you shouldn’t have to hire a lawyer to use software that is supposedly “free” and “open-source” in your application! You absolutely shouldn’t be forced to abide by someone else’s terms for simply using a LIBRARY in YOUR application!

In conclusion, if you are a developer, unless it’s licensed under the GPL+CE do NOT use GPL-ed software in your project! The GNU GPL is a virus to your project in it’s entirety and is considered to be “free as in speech” rather than “free as in beer.” To me, free should mean free, not freedom; as they are two completely different terms. I personally only choose to use libraries and other software in my projects that are licensed under the MIT, BSD, zlib, or other similarly styled licenses.

C/C++ Programming Setup on macOS 10.15 Catalina

Unfortunately, macOS does not come with development tools pre-installed like on Linux, BSD, and other *nix systems. Luckily, it’s simple and easy to do. Open up the Terminal application (Applications/Utilities/Terminal.app) and type:

xcode-select --install

This installs all of the standard command line tools you should be used to, since it’s no longer an option to do so inside of the Xcode IDE. Speaking of which, you no longer need an Apple Developer account to install Xcode. Simply open up the App Store application, search for, and install Xcode:

All done, start programming away!