I have an open-source project that I originally wanted to license under MIT, but since I'm using a GPLv3 component that I can't quite get rid of (namely, the .g4 ANTLR grammar file that I'm using to generate a lexer/parser), I've been sort-of forced to distribute my project under GPLv3 as I understand anything that touches anything under GPLv3 needs to go under GPLv3 - I figured the ANTLR-generated code was a derivative of the grammar file, so the lexer/parser needs to be under GPLv3. Is that right?So I'm distributing the project under GPLv3. And there's a [distinct] part of the project that's under MIT.Now, I came across a piece of very useful code on someone's blog, a modified version of some code that was originally published under CPOL, so I figure the modified version is also under CPOL.Can I even use that code? The CPOL explicitly forbids sublicensing, so I'm a bit lost as to what to do with this...All I want is to give the original authors credit for their work - why does it have to be so complicated? /rant
Can I use CodeProject code in a GPL project?
gpl;license compatibility;cpol
CPOL is not an open source license according to the OSI definition. It has a clause which does not allow it to be used for any purpose as mandated by the GPL or MIT license:You agree not to use the Work for illegal, immoral or improper purposes, or on pages containing illegal, immoral or improper material.Neither the GPL or the MIT license force the user to agree to this. So by putting a CPOL work under either of these licenses, you remove this restriction against the will of the original author.Although this clause is well meant, it is incompatible with any FSF or OSI approved license. That means it can not be incorporated into an open source project without making that project un-free.All you can do is contact the original author and ask them if they license it to you under GPLv3.