[mxe git repository from today]
Using mxe's unmodified Qt build, and linking it to my application, the
size of the binary increases from about 7MByte to 12MByte (after
stripping) if compared to a MinGW build. This hurts. I thus wonder
how to reduce it.
With MinGW, I've approximately followed
http://www.formortals.com/build-qt-static-small-microsoft-intel-gcc-compiler/
to compile Qt 4.8.3 statically, using the following call to Qt's
configuration script:
configure -release \
-nomake examples \
-nomake demos \
-no-exceptions \
-no-stl -no-rtti \
-no-qt3support \
-no-scripttools \
-no-openssl \
-no-opengl \
-no-webkit \
-no-phonon \
-no-style-motif \
-no-style-cde \
-no-style-cleanlooks \
-no-style-plastique \
-no-sql-sqlite \
-platform win32-g++ \
-static \
-qt-libjpeg \
-qt-zlib \
-qt-libpng
I assume that `-no-exceptions', `-no-stl', and `-no-rtti' really help
reduce the library size, while most of the other options are rather
unimportant for static linking (please correct me if I'm wrong).
Changing the configure options in `qt.mk' is straightforward, however,
the above link also suggests to change compilation options by setting
QMAKE_CFLAGS_RELEASE. How can I do this?
BTW, calling `strip' on the binary removes symbols from all statically
linked stuff also, right?
Werner
PS: I know that I won't use C++ exceptions in my code :-)