Answer the question
In order to leave comments, you need to log in
Cross-platform applications on Qt. How to deal with the large size of statically linked libraries?
Hello. Faced with the task of writing a cross-platform program. The choice immediately fell on Qt in conjunction with QML. On Linux, there are no problems with the presence of Qt itself, but on Windows and OS X, by default, they are not, and forcing the user to install something additional looks strange. Therefore, I decided to use static linking with Qt. On Windows, the size of the libraries is within 30-50 mb, but on OS X, the size is 100-200 mb (despite the fact that the Qt development environment itself weighs 10 GB on a poppy). For an average application of 200 MB of libraries, this is very strange. Question: Is there a way to reduce the size of the compiled file? I'd like to hear advice from those who use Qt on a regular basis, how do you deal with the lack of Qt itself on many systems?
Answer the question
In order to leave comments, you need to log in
Why static linking on a Mac? There will still be all one .app file, all the necessary dynamic libraries are uploaded through macdeployqt.
You have a terminology problem - with static linking , you should get exactly one file at the output, which depends only on the standard Windows libraries. At the same time, you can compile Qt static libraries in such a way that they will not have "extra" (Qt functionality that is not involved in your program).
Here you will have three problems:
After that, it will be possible to set a UPX-type packer on the received file, which will allow you to win another 30 percent.
What kind of libraries do you need for static(!) linking? The output static is dependent only on system libraries.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question