5

I have been reading this link: https://wiki.qt.io/Licensing-talk-about-mobile-platforms and on that page, it says:

Qt for Android / Necessitas

As Qt for Android uses the LGPL version of Qt, and it's perfectly possible (and also recommended and supported) to dynamically link in the Qt libraries when creating an app - there are no problems for app developers using Qt for Android. The app developers can develop closed source code and publish the app - no worries.

Only if you statically link with the Qt libs could there be a problem with closed source apps.

So in Qt Creator, in the Build section there is a section called Qt Deployment with three options:

  • Use Ministro Service to install Qt
  • Bundle Qt Libraries in APK
  • Deploy Qt Libraries to temporary directory

If I choose, Bundle Qt Libraries in APK, is that still considered as Dynamic linking or will it be considered as static linking (even though technically it is dynamic)? It is dynamic as far as I know because inside the APK file, I can see the Qt libs. The only difference is their location.

In the folder /lib/armeabi-v7a/ there is: libQt5Core.so, libQt5Gui.so, libQt5Widgets.so etc so the libs are there so they are not statically linked but to the end user, and APK is like an EXE and it does not require external libs to download in order for the APK to run (even though technically the APK requires the Qt libs which happen to be within the APK itself) - this is why I am asking.

So to be very clear and direct, is choosing the "Bundle Qt Libraries in APK" option considered as dynamic linking?

Thanks

rwx
  • 573
  • 1
  • 7
  • 22
  • 2
    Don't buy that urban legend - statically linking to Qt under LGPL is perfectly legal, and you don't need to open your source code, just provide a link to your object files to satisfy the license requirement for the possibility to relink. – dtech Mar 27 '16 at 09:52
  • 1
    Thx for that response. I appreciate it. – rwx Mar 27 '16 at 21:37

1 Answers1

5

It's dynamic linking. The Qt libraries are .so files, and they are bundled in the APK file. But they are still .so files, separate from the executable.

sashoalm
  • 75,001
  • 122
  • 434
  • 781
  • 1
    Hey thx for that! Here is another link the fills me with even more confidence: http://stackoverflow.com/questions/11607682/does-qt-creator-by-default-statically-or-dynamically-link-its-libraries?rq=1 - a response provided by: SystematicFrank "Qt uses dynamic linking by default" and also "If your concern is the LGPL, just be careful when compiling Qt itself. Most LGPL violations with Qt are not because of static linking (since dynamic is the default), but for compiling Qt with non-default parameters." In my case, everything I use is default and official. – rwx Mar 27 '16 at 07:02