PDA

View Full Version : Qt static link with minimum size



foens
25th February 2010, 12:09
Hello Qt community.

I have been trying to figure out for days how to decrease the size of my Qt application when using static linking.

It has lead to my application looking like, well, not good.

The problem is that I want to reduce the size of the executable, but I would like to include just what I need - unsure what that is.
Does anyone know what I should NOT disable? I guess I have disabled something which (see attachment) makes my application look bad.

I use these g++ CFLAGS:
-Os -momit-leaf-frame-pointer
(as suggested in http://www.formortals.com/build-qt-static-small-microsoft-intel-gcc-compiler)

And when compiling Qt i use these ./configure flags:
-nomake examples -nomake demos -prefix "$LOCATION" -release -opensource -static -no-exceptions -no-accessibility -no-stl -no-opengl -no-sm -no-glib -no-fontconfig -no-xrender -no-xrandr -no-xfixes -no-xcursor -no-xinerama -no-xshape -no-libtiff -no-libtiff -no-svg -no-webkit -no-javascript-jit -no-script -no-scripttools -no-declarative -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl -no-nis -no-cups -no-iconv -no-pch -no-dbus -no-sql-mysql -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-qt3support
where $LOCATION is of course a location to install to.

I have attached a picture of the problem.
I would like to remove these -no-FEATURE flags once at a time, but it takes half to a full hour to compile - which would make this a very time consuming problem.