Reputation: 2489
I've started working on a project in c++ that uses a few third party open source libraries. I'm curious, how should I build this project to avoid license contamination?
If I were to compile a single executable file I would then have to adhere to the same open source license used by the third party libraries since my work would contain the libraries in binary form, correct?
I'm using visual studio as ide and compiler. Is there an option within visual studio that can be configured so that when I build the project, all third party libraries are included separately in their own directory, allowing my program to utilize them without having to be compiled into my executable? This way I would be able to license my project under a different license?
On another note, I also have a source file from one of the libraries included in my project. I'm guessing this is going to be a problem regardless of how I separate the libraries as this source file is compiled into my application?
Upvotes: 0
Views: 291
Reputation: 96139
The licensing terms generally doesn't change with which folder you put the files in!
If the libraries (.lib) you are linking to are GPL, then your code is a derived work and is also GPL. Similarly if you use source code directly from the GPL project you have also created a derived work. Other more permissive licenses like MIT/BSD don't have this feature.
If the libraries are LGPL and you link them dynamically (ie you ship the .dlls - assuming you are on Windows) then your code is not GPL.
See https://www.gnu.org/licenses/gpl-faq.html, although be aware that their's is understandably a rather biased view of how you should license your code.
Upvotes: 3