3

I'm a new developer and recently have to work on project where I guess using arduino lib will be easy, because writing my own library will be a lot more time consuming. This isn't a mass production device, it is a embedded system that I have to develop to solve a task, my client will be using this system. The arduino lib which I'm using is licensed under GNU LGPL.

My question is:

1.Can I use the lib APIs in my code and then license my code under my own terms?

2.What is the deal with static linking and dynamic linking of this lib?

3.Do I have to redistribute my code or any object form of my code?

So far I don't see any need for me to modify the library code, will just be using APIs.

3
  • "So far I don't see any need for me to modify the library code" -- This part doesn't really change your obligations. You still have an obligation to deliver the source code of the (L)GPL code that you are providing.
    – Brandin
    Commented Dec 18, 2019 at 7:14
  • @Brandin Please help me understand this. "You still have an obligation to deliver the source code of the (L)GPL code that you are providing." this means that I have to deliver the library source code to the user and not the my code which uses the library APIs right? This might sound dumb to ask, but after reading so many forums and licenses I'm really confused. Please help Commented Dec 18, 2019 at 9:23
  • The LGPL works by including the GPL and giving additional permissions, so it means that you still have the normal GPL obligation to supply source code of whatever LGPL components you are distributing. See the section Conveying Non-Source Forms in the GPL. You do not have to deliver source code to your own code. That is what the LGPL says by defining a new term "Combined Work" and giving the conditions under which you may distribute that.
    – Brandin
    Commented Dec 18, 2019 at 11:36

1 Answer 1

4

1.Can I use the lib APIs in my code and then license my code under my own terms?

Yes, as long as your license does not forbid users of the code/device to replace the LGPL library with a different version.

2.What is the deal with static linking and dynamic linking of this lib?

The LGPL requires that it must be possible to replace the LGPL code with a different (compatible) version and have a working executable using that code.

There are three ways of fulfilling that requirement

  1. Using dynamic linking. Then the dynamic library (.so/.dll) can just be replaced.
  2. Distribute object files of the application. This way, the new library can be relinked into the executable.
  3. Distribute source code.

3.Do I have to redistribute my code or any object form of my code?

No, unless those files are needed to create a functioning executable that uses a new version of the LGPL library.


In the answers above, I have disregarded any contractual obligations you might have to provide your code to your client. The answers also apply to your client if they decide to sell the device to customers.

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.