Koen Deforche wrote:
If we agree with this, then the next question is: what about example code ? Clearly the intention of the example code is to help the developer get on its way for using the library. But is it ok to copy/paste some of that code or does that automatically make the work derived ?
It depends. Copyright protects creative works. If the example merely demonstrates the mechanical use of the library interfaces in an obvious way, it is not protected. If it contains sufficient portions of creativity, it may be considered protected and using it as a base may create a derived work.
For example, for a project, we started from the boost asio http server example, and extended this with various things to suit our needs, and put the result in a library ("wthttpd").
Can we now:
... If you really want to be on the safe side, your best bet is to contact the author of the http server example and either ask him for permission or persuade him to place the example into the public domain. Did I mention that I'm not a lawyer?