I’m starting to work on a C library, and I am having trouble choosing a license, so I need some help.
Keeping in mind that:
- I want as many people as possible to be able to use my lib, without them worrying about license compatibility, both for libre and proprietary programs;
- My lib is designed to be statically linked, so its license must allow static linking without compromises;
But, also:
- I want for whoever uses my lib to credit me: I think mentioning my library’s name, optionally with an URL to my repo and the license text copypasted, in the final software’s documentation / credit page / whatever would be enough;
- I want for people that make changes to my library, and then use the modified version in their program, be it free or proprietary, to publish the modified source code of my library, under my license (but they can keep the rest of their program under whatever license they want).
What license should I choose? I really have no idea.
I think that if I only cared about the first 3 points, I could choose MIT, but considering the last one?
Sounds like LGLP might be it.
LGPL has restrictions on static linking, actually. It’s one of the reasons why SDL 2.0 had to recently drop it in favour of the zlib license. So, not really a good choice in my case, it goes against point 2 of mine.
The zlib license, however, doesn’t respect point 3 and 4.
I heard of a LGPL with static linking exception (no additional restrictions on static linking), but it’s not vastly used, so I don’t know much about that. Maybe you do?
Ahh didn’t know about that. What restrictions are there exactly?
Sorry :/
If you use an LGPL library in a proprietary program or with incompatible open licenses:
Very good and accurate explanation! More info at GNU’s FAQ.
Today I learned. Interesting. I did not know about this at all. Never mind, then.
This is the first licence that came to my mind as well.
I think it should be what we are looking for here.Not ideal for static linking, though (see other replies to this comment).