Hack Forums
[C] G++ reduce output file size - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] G++ reduce output file size (/showthread.php?tid=6076012)



G++ reduce output file size - SIM-3149568 - May 8, 2020

Hi, is there any methods to reduce compiled output size? I used -Os parameter and #pragma once every header.
I want to know there is more method to reduce more size


RE: G++ reduce output file size - Tafelpoot - May 8, 2020

WIN32_LEAN_AND_MEAN and only include headers that are absolutely necessary.


RE: G++ reduce output file size - saltycracker - May 8, 2020

(May 8, 2020 07:22 AM)tree8069 Wrote:  Hi, is there any methods to reduce compiled output size? I used -Os parameter and #pragma once every header.
I want to know there is more method to reduce more size

This really depends on what you are trying to create.

(May 8, 2020 09:22 AM)Tafelpoot Wrote:  WIN32_LEAN_AND_MEAN and only include headers that are absolutely necessary.

You can include every header file known to man but it won't compile it into the exe unless you use that functionality.


RE: G++ reduce output file size - 0xDEAD10CC - May 9, 2020

You can merge sections among a few other things.. All techniques you can find online.