Results 1 to 3 of 3

Thread: Specification on LGPL and Dynamic linking

  1. #1

    Default Specification on LGPL and Dynamic linking

    I already understand that we can distribute Qt dlls with our application as long as we don't make any modifications to the code and we don't have to release the source code for our application or distribute our application with source code to Qt.

    However, I can't help but wonder about one thing. Must the dlls absolutely be the original binary copies of the ones that come with the Qt sdk?

    Or can we make our own binary copies and distribute them (provided that they haven't been modified) without accompanying it by any source code?

    What if I wanted to reduce the size of the .dlls by changing the compile defines to exclude the components that I don't use (ex: #define QT_NO_TREEVIEW) and compile my own dlls. Would it suffice to just specify which defines I have used to compile the Qt dynamic librairies, and as such I would not have to provide any source code modifications or distribute any source code with my application?

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Specification on LGPL and Dynamic linking

    Quote Originally Posted by elfkarr View Post
    I already understand that we can distribute Qt dlls with our application as long as we don't make any modifications to the code and we don't have to release the source code for our application or distribute our application with source code to Qt.
    You CAN distribute Qt DLLs with modifications as long as those modifications are open source. If you don't make any modifications, then there's no need to make anything open source as long as your application is dynamically linked (DLLs).

    However, I can't help but wonder about one thing. Must the dlls absolutely be the original binary copies of the ones that come with the Qt sdk?
    The GPL license seems to imply that as long as someone can recompile the library and it works with your application, thats enough. If someone recompiles and includes the treeview, it shouldn't make any difference to your application. The library will just be bigger.

    However, it isn't much to include the 'configure.cache' file that gets created when your recompile Qt. Then people can generate the exact same version of the library that you distributed. Of course, if you modified the header files to include or remove other #define's, then that technically is a modification to Qt itself, and therefore you should include those modified files too.

    Under Linux I wouldn't recompile the library, as Qt is typically installed globally, rather than included with the application.

  3. #3

    Default Re: Specification on LGPL and Dynamic linking

    Thanks for the clarification. It's a little how I thought (or at least wished for) it to be.

    You're missing one important point though. The defines can be defined globally in the make file. They don't have to be added or changed in any headers.

    Qt Code:
    1. #############################################################################
    2. # Makefile for building: simpledommodel
    3. # Generated by qmake (2.01a) (Qt 4.6.1) on: Sat Feb 6 08:44:32 2010
    4. # Project: simpledommodel.pro
    5. # Template: app
    6. #############################################################################
    7.  
    8. ####### Compiler, tools and options
    9.  
    10. CC = gcc
    11. CXX = g++
    12. DEFINES = -D QT_NO_TREEVIEW -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
    13. ...
    To copy to clipboard, switch view to plain text mode 

    Meaning all I will really be doing is changing the compile parameters. So going by what you said, it's fine as long as I provide the exact steps I took to compile it in a Readme.txt (and indeed, if people use the original binaries it should still work anyways).

    My configure.cache contains:

    Qt Code:
    1. -debug-and-release
    2. -confirm-license
    3. -plugin-sql-sqlite
    4. -plugin-sql-odbc
    5. -qt-libpng
    6. -qt-libjpeg
    7. -openssl
    8. -opensource
    9. -no-incredibuild-xge
    10. -dont-process
    To copy to clipboard, switch view to plain text mode 

    And in my case I don't think that would change. Ahh unless I removed some of those too...

    Thanks.
    Last edited by elfkarr; 6th February 2010 at 15:51.

Similar Threads

  1. plugandpaint example with dynamic linking
    By John Weeks in forum Installation and Deployment
    Replies: 1
    Last Post: 9th January 2010, 08:57
  2. MAC OSX Dynamic Linking and Deployment
    By rokkamraja in forum Qt Programming
    Replies: 1
    Last Post: 24th October 2009, 15:14
  3. Dynamic linking on Mac OS X
    By Vnuce in forum Newbie
    Replies: 6
    Last Post: 19th October 2009, 13:31
  4. Linking Qt in a dynamic library
    By dave_mm0 in forum Qt Programming
    Replies: 4
    Last Post: 18th July 2009, 16:28
  5. dynamic linking on mac
    By munna in forum General Discussion
    Replies: 4
    Last Post: 1st January 2007, 18:39

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.