So I have this super sweet library I'm working on. Let's say I release it into the wild under GPL. In tandem I'm working on a commercial piece of software, and I'd like to use this library in it.

Since I made the library in the first place (even though I made it GPL), is it safe to assume I can use it in the commerical app?

Now that it's released as GPL, lets say some people make some awesome updates to it. Their work is also under GPL. Therefore I cannot include their changes in my commercial app, unless I wanted to make my commerical app GPL as well (which I don't). In that scenario, the safest thing to do would be to use my library as it was originally released when it was 100% my own code.

Is the above correct? If so, would releasing my library under LGPL be a better idea so I can re-incorporate changes to it into my commercial app since I'll just be linking to the DLL?

Edit after Thomas' answer:

To add a bit about the dual licensing option, it does open up the world of being able to commercially sell my library. On the other hand, I really want to bring in other developers to improve it (if they want), which kind mucks up the commercial licensing aspect. What is more important? For me, I'd rather have a better library than make a couple bucks off of it (it's not THAT impressive), so Thomas' point about going with LGPL is perfect. That allows me to both solicit assistance, and to take advantage of other contributors I can simply link to the DLL inside of having the original code baked into my solution file. The important bit is that I can use this improved code in my main commercial app and I won't worry about commercializing a subset of it (this library).

  • 5
    You are looking for dual licensing. In particular, How do I dual license? is likely exactly what you are looking for.
    – user40980
    Commented Jan 18, 2016 at 18:33
  • 1
    Why don't people put question/answers like this on open source stack exchange? It seems like Programmers is still the place for "good" questions and answers of this type.
    – Brandin
    Commented Jan 18, 2016 at 20:26
  • @Brandin Probably just inertia. I've seen a handful of licensing questions here get migrated to OS.SE, and they seem to accept more of them than we do.
    – Ixrec
    Commented Jan 18, 2016 at 21:53

2 Answers 2


Yes, you can release the portions that you own (in this case, the library before modifications were made by other contributors) under one or more other licenses. Those other licenses could be anything that you want, from other open source licenses to specific licenses to other people or organizations.

If you are producing a library that is meant to be linked to, then releasing it under the LGPL would probably be better. It would ensure that modifications to your library remain open and free, while letting people link to the library in closed-source applications.

It's easiest to make licensing decisions before you release the software to the public, and definitely before other people have contributed. Once other people contribute, you can't simply change the license on someone else's work.

  • I like where MichaelT is going with dual licensing. If I want to include work from other contributors, then I assume that kills the dual licensing as I'll need to get buy-in from them to dual license a commerical license. Is it practical to do this (contact contributors and give them a cut of the commerical dual license if they agree)? Commented Jan 18, 2016 at 18:35
  • @BillSambrone It's much harder to change the license once there are multiple contributors. If it's not in public yet, you can release the first public version under one or more licenses. However, I'm not sure what that would buy you: if you want to ensure that your library and all modifications are free and open (and stay that way), yet let people use it in closed source applications, then LGPL is all you need. Have you actually released your code yet?
    – Thomas Owens
    Commented Jan 18, 2016 at 18:38
  • @BillSambrone I don't think you have to worry about dual licensing at all, then. Simply choose an appropriate license for your library that enables it to be free and open, people to contribute to it, and it to remain available for commercial use. Then, you can keep up with the latest and greatest version in your commercial application.
    – Thomas Owens
    Commented Jan 18, 2016 at 18:42

Yes, as @ThomasOwens said, you can use the portions that you own (that you wrote) in a closed-source, non-gpl app.

I think what clarifies this, but hasn't been mentioned, is the distinction between license and copyright. You, the author of the code, own its copyright despite licensing the code under gpl. In fact, you should immediately, if not sooner, go to http://www.copyright.gov and set up an account. Then register your copyright (Form TX) online. This is especially important when you intend to use that code commercially. If copyright matters ever come under dispute, courts look very favorably on you if you've registered the copyright before infringement occurs.

As for gpl, that's just a license issued by the copyright holder. And the gpl specifically prohibits using licensed code in closed-source projects. But you're not a licensee. You're the copyright owner. So you can do what you want. But, exactly like you said, you won't own the copyright to contributions to your codebase from other programmers. You'll be a licensee to their copyrighted code, and they'll be a licensee to your copyrighted code.

Again, go to http://www.copyright.gov and register the copyright to your code. Even if you don't intend to use it commercially, it just costs a few bucks, and it concretely establishes you as the copyright holder. In principle, you own the copyright to anything you write the moment it's on paper. But, like I said, in practice, if the matter comes under dispute, courts look very favorably on you if you've registered the copyright before infringement occurs. P.S. I'm not a lawyer (and I don't play one on tv:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.