For example, I have code

int main()

where I have copied a section of code from a MIT licensed library. In this case, i want to release my project code with all right reserved.

  1. is this allowed under MIT licensing of the library?

  2. If it is allowed, I believe I would still need to include original MIT license notice due to

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

in this case, how can I include this without having the included MIT license for library applying to my original code which is not intended to be MIT licensed?

1 Answer 1


You must retain the notice and make it clear (at least by the name of the library) which code the MIT license terms apply to. You do not need to make the MIT license terms apply to the software as a whole. (If a license does require this, we call it a "copyleft" license. The MIT license is not a copyleft license.)

For example, here is a screenshot of how the Chrome browser (which is under a proprietary license) attributes the libraries it uses in chrome://about:

screenshot of the page chrome://about showing permissive terms for Android Crazy Linker

  • So a simple credits page would suffice? Am i correct in understanding I do not need to specify which part of code in particular is my own vs MIT licensed?
    – gstcsr
    Oct 25, 2020 at 0:10
  • @gstcsr, that is correct. Oct 25, 2020 at 9:54

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.