Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt static build - impossible size

I am quite new to Qt programming, and i tried long to understand how linking the libraries work. I need to distribute a small program - 1000 lines or so - that i developed to a few people.
I built statically Qt because I need a static build, and now my programs size increased drammatically.

I only use Qpushbuttons, Qlinedits, Qlabels, and a few more things and I ended up with a compiled program of over 160Mb, while just a few MB would be reasonable.
I assume it included unwanted libraries and classes (only explanation). How can I keep the size something acceptable with a static build?

I'm running linux 64bit and need to compile as such and for it.

thanks

like image 631
Rollulp Avatar asked Mar 08 '26 20:03

Rollulp


1 Answers

I'm assuming that you are doing a project build in debug mode. I propose to build application in the release mode. The size of the output file will decrease dramatically.

like image 178
Roman Ozhegov Avatar answered Mar 10 '26 09:03

Roman Ozhegov