I'm shipping a stand-alone Linux application with Qt libraries compiled-in.
Is there a tool which would scan my source code, see which classes/methods my app uses, then it would pluck the unnecessary/unused stuff out of the Qt source code and compile Qt libraries tailor-made for my application without any extra bloat? This is the best case scenario, of course. But what is the closest existing solution that would allow me to make my Linux stand-alone app with compiled-in qt libs as slim as possible?
Is there a tool which would scan my source code, see which classes/methods my app uses, then it would pluck the unnecessary/unused stuff out of the Qt source code and compile Qt libraries tailor-made for my application without any extra bloat?
The linker already does this for you. If you're statically linking to the Qt libraries, then only the code for the functions that you're calling will be embedded into the executable.
You don't need an external piece of software to do this. It doesn't matter how big the Qt libraries are on your development machine.
for additional size reduction of your program try UPX - it will make your application even smaller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With