I was searching about this for a couple of days and have not found the way to do it right. I want to make standalone app on linux. It seems that static linking is the best solution, but how to make Qt static? If there is any link how to do it step by step I would be grateful.
Asked
Active
Viewed 775 times
0
-
1You can start here http://doc.qt.io/qt-5/linux-deployment.html – demonplus Oct 05 '16 at 06:40
-
Possible duplicate of [How to build Qt 5 statically](http://stackoverflow.com/questions/15340688/how-to-build-qt-5-statically) – demonplus Oct 05 '16 at 06:41
-
1Note that static linking requires either commercial version of Qt, or licensing your own software with GPL (third option is providing object code and Makefiles so user can re-link the software with different Qt library, but that's rather messy...). – hyde Oct 05 '16 at 06:45
-
You might want to look into [Snappy](http://snapcraft.io/) or [Flatpack](http://flatpak.org/), they're the upcoming application+dependency packaging technologies for Linux. – hyde Oct 05 '16 at 06:48
-
@hyde - because the world is full of people eager to relink applications rather than using them :D – dtech Oct 05 '16 at 09:30
-
@ddriver You'd be surprised, if the application is worth anything and actually useful. Anyway it just takes one who wants to use custom Qt. At this day and age, it's best to just put source package (or object code package in the scenario we are talking about) available for download with the binary, if there's (L)GPL requirement to do so. – hyde Oct 05 '16 at 14:11
-
But to what possible end? If there is extra functionality in that "custom Qt" they won't be able to reference it since they can't change the object files. Not to mention it could actually break stuff. The only viable reason to do that would be to insert extra routines in the calls in order to sniff on the design architecture with malicious intent. – dtech Oct 05 '16 at 14:42
-
Also, there is a requirement to make it possible to relink, but there certainly isn't a requirement to make your code work with just about any different or custom version. Older versions might lack needed functionality, newer versions might introduce regressions, custom versions might break things. From the perspective of an application user, I don't see any good reason to relink, on top of the efforts it requires and risk it represents. – dtech Oct 05 '16 at 14:54
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/125062/discussion-between-hyde-and-ddriver). – hyde Oct 06 '16 at 06:17