Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiled file gets heavier and heavier #50

Open
AlexandrPutenikhin opened this issue Jan 15, 2024 · 1 comment
Open

Compiled file gets heavier and heavier #50

AlexandrPutenikhin opened this issue Jan 15, 2024 · 1 comment

Comments

@AlexandrPutenikhin
Copy link

[Windows 10, x86_64]
https://file.garden/ZB1peNEMpVTUWaAO/mingw
The forest1.exe was compiled yesterday. The forest2.exe was compiled today. I remember that it weighted around 45 Kib. I did not add add anything. I also compiled the same code on my school's computer and it weighted even more. Please help

@TJ-develops
Copy link

Ensure that the compiler settings are identical on both your machine and the school's machine.
Make sure you're using the same MinGW version on both systems. Different versions can produce different executable sizes.
Also, debug information can significantly increase the size of your executable. Make sure you are compiling without debug info for the release version. You can do this by adding the -s flag to the linker, which strips debugging symbols.
For example: gcc -Os -s -o forest.exe forest.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants