A similar question already asked here (https://softwareengineering.stackexchange.com/questions/159023/can-cc0-code-use-a-gpl-library)
but my question is a little bit different, perhaps more accurately.

Can I use/apply a public domain license to my program while my program uses the GCC library or uses GPL libraries (link or runtime use or...)?
like this:


#include <gpl_licensed_library>
#include <my_library>

And now can i say:
code is licensed under the CC0. and i use gpl_licensed_library library that released under the GPL.
if answer is NO, then What license compatibility mean?

  • Why do you believe that your use case is different than the linked question? – Christian Jul 6 '16 at 16:11
  • I ask for license compatibility mean. and use code. – mlibre Jul 6 '16 at 16:27
  • If the good answer over there does not satisfy you , you need to edit your question to explain why. It certainly seems like it's the same question to me. – MAP Aug 5 '16 at 5:09

You need to release the whole program under GPL. But nothing prevents you to release the additional source code that you wrote under CC0 as well (it is your code, you can give as many permissions on it as you wish).

However, if you distribute a binary for your software, it can only be distributed under the GPL to meet with the conditions of this license.

Similar to your situation would be a US government employee contributing to a GPL software. Their contribution is automatically in the public domain but the full software continues to be licensed under GPL. See this reference : https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.en.html#GPLUSGovAdd

Note also, from the GNU FAQ:

If a program combines public-domain code with GPL-covered code, can I take the public-domain part and use it as public domain code?

You can do that, if you can figure out which part is the public domain part and separate it from the rest. If code was put in the public domain by its developer, it is in the public domain no matter where it has been.

What compatibility means

Compatibility is understood one way: public domain code can be included in a GPL software, not the other way around.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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