User forums > Help

Large output file size

(1/2) > >>

yeyidogan:
Hi,

I am a new user of CodeBlocks. After 2 long day, I have created my first gui application on windows.
I am using mingw, wxpack and wxsmith and codeblocks.

My output file (...exe) is very large.
Debug output is 35 MB.
Release output is 2.5 MB.

Why the output files are large?

Thank you all.

polygon7:
http://www.mingw.org/wiki/Large_executables

yeyidogan:
Thank you polygon7,

I have tried that settings, but there is no change.
I have created a new project and copied old files to new project. The output file sizes are:
Debug:  5.022 KB
Release: 2.430 KB
So debug is decreased from 30 MB to 5 MB. But release output file size is same.

I am looking at firefox.exe. It is 301 KB. But my basic gui software is 2.5 MB  :shock:

Thank you.

Ramazan Kartal:
Hello,

You can try "strip -s program.exe". Most of the time, this will strip a little more unnecessary info from the executable, even though you specified -s on the linker command line.

>> I am looking at firefox.exe. It is 301 KB. But my basic gui software is 2.5 MB  Shocked

This is because firefox.exe uses dynamically linked libraries, it will load the libraries only when it is necessary.

Best regards,
Ramazan Kartal

frithjofh:
hi,

I made some similar experiences... in the end though, the size relies before all on the functionalities you put into your code. How much lines of code do you actually have. You said, you programmed it in two days, so it can´t be much more than, lets say, 1500 lines, assuming you are not one of those coding geniouses out ther ;)

Compiler settings is not all. I assume you code in c++ ? Probably you include explicitly or implicitly much more "outside" libraries than you actually need, first I would check all the headers in your files and figure out, if you really need them all, sometimes this works wonders. Another thing would be to check the usage of STL standard templates. If you use twenty std::map<> all with different template signature, your code could also inflate a lot.

But using wxWidgets you almost always end up with the cuoted sizes of executable when everything is staticaly linked ...

The most important would be to tell us, what type of programm it is, how many files, what functinalities, which dependencies, and so on...
If not it is rather dificult to judge if your csae falls under normal sizes or not. Anyways: hurry, because this topic is likely to be blocked soon by the moderator of the forum, as it seem to be more a general programming issue rather than having to do with code::blocks

Regards

nausea

Navigation

[0] Message Index

[#] Next page

Go to full version