Minimum size of static-linked Qt GUI app?
-
Hi, all.
I've compiled static Qt lib and created a simple GUI app using this static lib.
The size of the program I got is about 5MB, which still seems a bit too large to me.If I change to msvc2008 to recompile Qt lib with some optimization options(currently using msvc2005 with default compile options), will I get smaller binary? And what's the minimum size of a static-linked very simple Qt app with UI? any guess?
-
[quote author="loladiro" date="1312878756"]You could also just pick and choose all the classes from Qt Gui you need and compile those as a library (this is a bit tricky, but if you don't use all components, it's a great improvement in size).[/quote]
oh, that's really tricky.
I bet anyone who tried that would get tons of "undefined reference..." -
[quote author="Gerolf" date="1312878800"]No, it will be much smaller then GUI lib. Only those things, that are used are added to the exe, the rest should be skipped.[/quote]
Yes.
In my case, the static QtCore lib is about 14MB, QtGui lib is 36 MB, while a simple static-linked GUI program consumes only 5MB. -
I "think" they are release libs because I configured with release option on.
And I'm talking about static lib, 2MB QtCore and 8MB QtGUI seems unbelievable to me...Anyway, what I'm caring about is the size of the final static-linked app.