2010-02-08 67 views
11

我正在编写GPL许可下的应用程序。我在GPL下的其他项目中找到了一些有用的代码。我想知道我能否使用它。GPL许可证。代码重用

  1. 我想从一个项目采取Foo类,并将其添加到我自己的项目。接下来,我想在Foo类中进行更改(重命名类名和函数名称,更改代码格式,删除某些函数,更改一些算法,添加我自己的函数等)。

    它允许吗?如何标记此课程是A项目的一部分?喜欢这个?

 
All original material Copyright (C) 2009-2010 author 

Original file from A: A/foo/foo.h 
Copyright (C) 1997-2001 author. 

This program is free software; you can redistribute it and/or 
modify it under the terms of the GNU General Public License 
as published by the Free Software Foundation; either version 2 
of the License, or (at your option) any later version. 

This program is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

See the GNU General Public License for more details. 

You should have received a copy of the GNU General Public License 
along with this program; if not, write to the Free Software 
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 

Or http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html#x1-40002.2? 
  • 接着,我想从项目添加一个函数来我的版本Foo类的。如何标记该功能来自B项目?
  • 谢谢,

    +0

    +1很好的问题 – Sarfraz 2010-02-08 07:39:55

    +3

    有关软件许可证的法律问题是题外话堆栈溢出,但*可以*是对话题上的[程序员的姊妹网站(HTTP ://programmers.stackexchange.com/)。请参阅[stackoverflow.com/tags/licensing/info](http://stackoverflow.com/tags/licensing/info)。 – 2012-07-26 07:51:36

    +2

    这个问题似乎无关紧要,因为它涉及许可。 – JasonMArcher 2014-11-05 00:04:35

    回答

    1

    来源:GPL

    “源代码”用于工作装置,用于使 修改,以使其工作的 优选形式。

    您需要在代码/项目的修改版本中提及explicitly名称/原创作者。

    +1

    此引用仅仅意味着,您应该将修改过的源代码以“人类可读”的形式发布而不会造成混淆。尽管提到原作者是“普遍礼貌”,但并不是有效的要求。 – RamboNo5 2011-09-11 11:09:45

    1

    很明显,你可以做到这一点。当然,你必须在GPL下发布你的代码。将原始代码的凭据放入评论中。

    3

    很明显,你可以这样做。您使用的文件已包含版权声明;你可能不会删除它。相反,把另一条线在下其下:

    Copyright (C) 2007-2009 Original Author // unchanged 
    Copyright (C) 2010 gaspode