Can I use any library I want in a public domain program?
<p>If I install a library on my system (let's say it's called <code>libfoo</code> and it is under the BSD license), then include the header in my program (in the public domain) and link the program to <code>libfoo</code>, is that legal?</p>

<p>It seems like it would be, since no library code is actually getting included in my final binary.</p>

<p>You need to check what license the library comes with. The fact that you want to create a public domain program doesn't give you any rights to any library. </p>

<p>So read the BSD license and see what it tells you whether and how you can use the library. For example, if you used a GPL-licensed library, you could <em>not</em> put your program in the public domain legally. </p>

copyright software licensing open-source-software