I was compiling some basic codes in qt. I observed that even for a hello world project , it is taking close to 1 mb , even in release mode. So did a google search on that. Found that main culprits are
- Included debuging info.
- included standard libraries.
- RTTI , EXCEPTION handling, usage of templates.
In my case, usage of templates is the main reason. Seems like compiler loves to generate different codes for each template instances. Eg. vector<int> and vector<string> will have different implementation.
Solution is to disable the above mentioned features using some compiler options