I'm using Qt for an embedded Linux app and want to make it as small as possible. At the moment If I make a statically compiled executable it will be 3.9Mb, pretty much only using the GUI parts I need. I got it to 3.9Mb just by using qconfig and configuration parameters. I was thinking about seeing how much smaller it could be made by modifying the source code before installing it, if someone has done something like this how small have you got it? thanks
Qt::How small can it be made?
Asked Answered
Have you removed debugging symbols? –
Nashner
Even a netbook comes with at least 1gb why are you worring about less than 4mb? –
Hamamatsu
@Hamamatsu Embedded often implies something smaller than a netbook. For example, would a Linux network router have a 1 GB hard drive? –
Matted
FrustratedWithFormsDesigner - Yes, forgot to mention that, I used strip -s which shaved about 500Kb I think. stacker - A lot of embedded systems, like a radio terminal, operate right on the edge of what they can do in terms of hardware. Can't afford to waste it on something like the GUI footprint. –
Disclimax
@Hamamatsu Qt on a netbook can hardly be defined as "embedded". Think smartphone, home appliance, etc. –
Legation
I've worked on this on a coldfire system (no mmu, small memory, i.e. size is of importance).
As the entire GUI consisted of custom widgets, we stripped out all classes except QWidget using qconfig. We also took the liberty of removing all resources from the projects files (i.e. stock icons, etc).
The result was, if I recall correctly, a library size of ~960kB. That was rather unusable though, resulting in us having to reimplementing quite a few widgets. However, we did not have touch nor a proper keyboard so we could write small, compact widgets. As we did this, we hardcoded the styling into the widgets, reducing the need for having QStyle's, etc.
© 2022 - 2024 — McMap. All rights reserved.