Reduce the size of Qt-compiled software
I have made a basic Qt application which only has one dialog, one text area, and one button but the compiled file requires QtCore4.dll and QtGui4.dll which makes by application around 7-8 mb. Is there any way to redue this size by doing static compilation and perhaps including only those modules that have been used and not the whole QtCore and QtGui api.
Thanx in advance.
Re: Reduce the size of Qt-compiled software
Not really, because the widgets you use require functionality implemented somewhere else, and all lead to QtCore.
So you can't do anything about this.
Anyway, 7 Mb is not so big these days... :)
Re: Reduce the size of Qt-compiled software
I statically compile my Qt applications which results in a 9+ MB file. I then use upx to compact the exe down to about 3 MB.
mAx
Re: Reduce the size of Qt-compiled software
but there should be some way around it..can we not just use the ".h" header file of the modules instead of whole <qtcore> and statically compile just the single header that we are using ?
Re: Reduce the size of Qt-compiled software
Quote:
Originally Posted by
ct
but there should be some way around it..can we not just use the ".h" header file of the modules instead of whole <qtcore> and statically compile just the single header that we are using ?
You should learn more about static linking... The linker just uses the parts it needs, nothing more! It does not matter if you include QtCore or single headers.
Re: Reduce the size of Qt-compiled software
I am making an MSN program under Linux (X11). There are 2 widgets, an SSL connection, an TCP connection, 2 line edits, 1 progressbar, labels and an pushbutton. The whole application is 68.5kb. Maybe it is a Window problem?
Re: Reduce the size of Qt-compiled software
Quote:
Originally Posted by
Voldemort
I am making an MSN program under Linux (X11). There are 2 widgets, an SSL connection, an TCP connection, 2 line edits, 1 progressbar, labels and an pushbutton. The whole application is 68.5kb. Maybe it is a Window problem?
But that isn't a statically linked application. Type ldd [your executable] to see all the libraries it (dynamically) links against.
Re: Reduce the size of Qt-compiled software
That's one of the main differences between linux thinking and windows thinking. In linux, you ask your clients to have the libraries installed in a central location. In windows, each application must package its own copy of its libraries.
Yeah, your application is 68.5kb, but then you have Qt itself installed somewhere, so don't forget to add that to your size calculations.