简体   繁体   中英

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:

  • 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM