Results 1 to 5 of 5

Thread: c++ templates , inline functions and Qt GNU LGPL v. 2.1

  1. #1
    Join Date
    Jul 2009
    Posts
    40
    Thanks
    7

    Question c++ templates , inline functions and Qt GNU LGPL v. 2.1

    Hello again

    Does Qt GNU LGPL v. 2.1 adds exceptions to using templates and inline functions ? Cause templates and inline functions are expanded inside the application code that uses the qt library. Without such exceptions I can know see the answer to the question why to buy the commercial license . Please tell me that such exception exists , although I doubt.

    Also is Qt library using templates and inline functions a lot through the library code, and which parts are those ? I know that is using templates for the container classes.

    Thanks
    Last edited by elizabeth.h1; 18th August 2009 at 09:50.

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: c++ templates , inline functions and Qt GNU LGPL v. 2.1

    inline/templates/inheritance all are allowed in LGPL.. dont worry

  3. #3
    Join Date
    Jul 2009
    Posts
    40
    Thanks
    7

    Default Re: c++ templates , inline functions and Qt GNU LGPL v. 2.1

    This is citation from
    http://lab.obsethryl.eu/content/lgpl...nd-c-templates

    "The LGPL requires that users be able to replace the LGPL code with a modified version; this is trivial if the library in question is a C shared library. But there's no way to make that work with C++, where much of the library consists of inline functions and templates, which are expanded inside the code that uses the library. So to allow people to replace the library code, someone using the library would have to distribute their own source, rendering the LGPL equivalent to the GPL."

    It also says that :

    "LGPLv3 fixes this oversight taking the template effect into account, but an unmodified LGPLv2.1 does not "

    and we know that QT is released under LGPLv2.1 ,not LGPLv3.

  4. #4
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: c++ templates , inline functions and Qt GNU LGPL v. 2.1

    they also have a file called nokia-lgpl-execption in the source tree take a look at that..

  5. #5
    Join Date
    Jul 2009
    Posts
    40
    Thanks
    7

    Default Re: c++ templates , inline functions and Qt GNU LGPL v. 2.1

    Thank you
    that answers my question

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.