LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-07-2006, 06:15 PM   #1
zero79
Member
 
Registered: Nov 2003
Location: Ohio
Distribution: Debian Unstable
Posts: 460

Rep: Reputation: 30
implication of statically linking to libstdc++


say i write some c++ code that i statically link with the '-static' gcc option (in order to make sure all of my users have the correct c++ library). does that automatically put my code under the gpl?

if i instead distribute libstdc++.so.6 alongside my own binary and dynamically link via the LD_LIBRARY_PATH environment variable, does that permit me to retain my code under my own license? are there any restrictions or implications with distributing libstdc++ unmodified?

thank you for your thoughts and expertise.

mike
 
Old 04-07-2006, 10:21 PM   #2
jlo_sandog
Member
 
Registered: Jul 2005
Location: USA
Distribution: F10 (x86_64)
Posts: 549

Rep: Reputation: 32
Perhaps you need to read the GPL or whatever other license for which you have questions. That means the whole thing especially the fine print. About the only sound advice anyone can give you here, and you should follow, is to GET A LAWYER.
 
Old 04-08-2006, 12:36 PM   #3
zero79
Member
 
Registered: Nov 2003
Location: Ohio
Distribution: Debian Unstable
Posts: 460

Original Poster
Rep: Reputation: 30
i've read the gpl, and understand it well enough. i've even read Richard Stallman's "Free Software, Free Society." i think my question is simple enough that it wouldn't require a lawyer, and i imagine that this is answered somewhere (maybe a faq or something).

this is an important question, and i wasn't able to easily track it down via google.

more consisely, my question is: would the fact that gpl code would be included in a binary that i would distribute require that all code in that binary fall under the gpl?

i have not distributed anything as such yet nor even written any code, but i want to know how to do the right thing.

mike
 
Old 04-08-2006, 01:03 PM   #4
zero79
Member
 
Registered: Nov 2003
Location: Ohio
Distribution: Debian Unstable
Posts: 460

Original Poster
Rep: Reputation: 30
i think these three faqs fully answer my question:

http://www.gnu.org/licenses/gpl-faq....LinkingWithGPL
http://www.gnu.org/licenses/gpl-faq....ereAggregation
http://www.gnu.org/licenses/gpl-faq....ibGCCException

so if you do statically link a C++ program and distribute the binary, your source code will be required to be distributed under the gpl.

however, with the libstdc exception, you can distribute the libstdc library alongside your program and link dynamically at runtime, and your source will not be required to be distributed under the gpl.

Last edited by zero79; 04-08-2006 at 01:16 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC4 doesn't have libstdc++.so.5 but libstdc++.so.6 baosheng Fedora 14 04-06-2008 10:08 AM
mismatched rpm versions of libstdc++ and libstdc++-devel pcweirdo Linux - Software 8 11-29-2004 09:30 AM
Problems statically linking with libsdl jakobf Programming 3 08-27-2004 12:20 AM
What is a statically compiled binary? james_cwy Linux - Newbie 4 11-09-2003 10:51 PM
Can't compile MPlayer statically. Nezzo Linux - Software 3 11-04-2003 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration