views:

135

answers:

3

I want to use a GPL'd library in my C# application, but not necessarily release my own code under the GPL. If I understand correctly linking against a GPL'd library using dynamic linking and not distributing the library in question means I can license my own app in any way I want (the users of my software would then be required to install the library themselves). Please correct me if I'm wrong.

My question is: how can I link against a DLL this way in C#? Do I only need to use C#'s using directive and add the DLL as a reference to the compiler? Is the distribution of the resulting bytecode legal?

EDIT:

What if I don't distribute my application, but provide it as a service over the network?

+3  A: 

You should really contact a contract lawyer. The FSF interprets this linking one way, which doesn't apply to all jurisdictions. For example, they interpret it that the resulting binary would be subject to the terms of the GPL since dynamic linking, in their mind, constitutes a derivative work. I'm sure in some jurisdictions that may be the case. However, I know in my jurisdiction, that is not the case. Your best bet for an answer you can bank on, is to talk to an IP lawyer.

jer
Although I only partially buy the 'jurisdiction' argument (even if it holds up in court!) because it goes against the expressed desires of another. But that's more of an ethical consideration -- and open -- I guess same goes if you don't like said copyright/patent and live in a jurisdiction in which is does not apply :-)
pst
That's right, it does. However, there are international treaties which prevent abusing copyrights and patents. In the case above I outlined, it's much more muddy. I'm not suggesting that he go against the wishes of the copyright holder, but what I am suggesting is that the onus is on the copyright holder to make sure the terms he or she uses are clear to convey his wishes, and not based on some interpretation by the FSF—Even if they did write the license. It's always wise to talk to an IP lawyer to find out what's legal in your jurisdiction.
jer
How are you going to find a lawyer who can tell you what sort of linking is kosher with the GPL?
Gabe
You don't need one to tell you about dynamic linking. All you need to do is ask one what constitutes a derivative work in your jurisdiction. Then, put him an example stating that you'll be using one, presumably unmodified piece of software, in yours, via an external mechanism provided by the operating system (not part of your software), and whether that constitutes a derivative work. Here in Canada, you have to make a modification to the thing for your work to be considered a derivative work of that thing. Using a GPL library without modifications is not a derivative work here.
jer
@Gabe I'm sure there are also lawyers who specialize in this sort of thing ^^
pst
There are even firms who do.
jer
I'm not denying that there are law firms/lawyers who specialize in this sort of thing. I'm asking how is an average programmer like myself going to find one?
Gabe
Forgive me if my tone comes off the wrong way, I'm not trying to sound rude at all; but the same way you'd find anything else: Open the phone book, go online, etc. Find a lawyers office, contact them and ask if they handle intellectual property matters as they relate to software. Find one that does, set up a meeting. This is actually how I found my lawyer.
jer
+3  A: 

I believe you are wrong wrt "dynamic linking". RMS would likely argue that, because your program depends on/requires/is built around said external libraries that your program is thus an "extension" or "derivative work".

However, many (but not all!) GPL libraries for the JVM/CLR come with a "classpath exception" or "linking exception". If the "classpath exception" is granted, this often seems to imply that you can re-package said classes/libraries in the same bundle (Assembly with ILMerge or JAR).

See the License section at http://www.icsharpcode.net/OpenSource/SharpZipLib/

And here is the GNU classpath exception: http://www.gnu.org/software/classpath/classpath.html (and plenty of other licensing information -- from RMS himself! -- is available at http://www.gnu.org)

For the edit question: Under plain GPLv2 you are only required to provide access to the source code to people with whom you distribute the software. Web-services/web-sites (those hosted by you, on a server in the cloud!) escape this because there is no "software distributed". (However, if you distributed said software which in turn ran as a "web service" in order to try and bypass said GPL license, I believe you are obligated to provide access to the source because it is a form of "dynamic linking", with a fuzzy name.)

However there are differences in the GPLv2/v3 and there are some license extensions which may require providing access to source code for web-services/web-sites.

GPL License FAQ <-- I think most of your general answers are in here. See the other answers about talking to an IP lawyer, especially if you are "unsure" (this usually means you "know" one way, but are trying to convince yourself another).

Disclaimer to all of the above: I am no lawyer.

pst
Thanks for the exhaustive answer: there is indeed an exception included with the license concerning derivative works.
akosch
+1  A: 
Danny Varod
Sadly no: would be too much work. Good suggestion though...
akosch