Unsolved How to add libraries to build app for all pc's
-
I am following this link - http://doc.qt.io/qt-5/linux-deployment.html
In app I am using QT += widgets , QT += core gui, QT += network these libraries
Now I want to create a build for all Linux desktop.
How to add these libraries to create an build for all Linux PC ?
-
@developerNancy It's not an easy task, actually the linux style distros are a pita in this respect. You have to bundle a lot of external libraries if you want it to work on all linuxes. Check out at least Flatpak, Ubuntu snapcraft and AppImage projects. AppImage has "linuxdeployqt" helper program (https://github.com/probonopd/AppImageKit/wiki/Bundling-Qt-apps) but last time I tried it, it didn't work for me and I gave up.
-
@Eeli-K Have you tried this link http://doc.qt.io/qt-5/linux-deployment.html In this create application package
-
@developerNancy I have tried static build sometimes, but it didn't work. You can try to find general information about static builds on linux and decide for yourself, but it's not a silver bullet. In short, static build doesn't guarantee compatibility in an easy way.
For dynamic linking the Additional Libraries part of the doc is the only relevant, otherwise it would be too easy. This is what the AppImage linuxdeployqt program tries to do automatically. In short, you have to deploy half of a linux system with your application. That's why those mentioned solutions exist. If it was as easy as bundling the Qt library binaries and your application binaries together everyone would be doing that already.
-
@Eeli-K I am following this link http://doc.qt.io/qt-5/linux-deployment.html In this create application package can you please tell me how we create build for all linux pc's using this link.
-
@developerNancy I'm sorry but I gave up on that long ago. You can find some extra links in an older thread, https://forum.qt.io/topic/76172/are-separate-builds-required-for-all-linux-distributions. But you have to either read and read again the Qt documentation page and learn how to do it, or learn a new packaging system like Flatpak or snappy. I can't help any more.
-
@Eeli-K Ok Thanks I am trying from last 2 days.
-
Hi,
Are you targeting a particular distribution ?