rwx
rwx

Reputation: 595

Qt for Android - Is "Bundle Qt Libraries in APK" considered as static or dynamic linking?

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:

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

Upvotes: 5

Views: 2763

Answers (1)

sashoalm
sashoalm

Reputation: 79595

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.

Upvotes: 5

Related Questions