User forums > Help
compiled files: size
phlox81:
I downloaded Code::Blocks a few days ago, and gotta say, good work guys :) :D
I installed the C::B Version which also brings a mingw compiler along, since
i only have an old MSVC 6...
So, now i startet playing around with some files, and also installed boost.
I was playing a little with boost::filesystem, but than wondered why my
executable was 2 MB big. So, i used the wrong library (debug).
With the normal boost::filesystem library the excutable is just 570 k,
which still is a bit big for a small programm, which only purpose it is
to test some code & compiling.
Then i created a Hello World Project, to see what a 'normal' Hello World
would compile to. Still 470 K.
I started then my old MSVC and copyied the project to it.
Result: Debug Version : 510 Kb, Release: 96Kb.
So, my question is, how can i make the Mingw make a smaller excutable
than now (if its gonna be better than 96 is not so important *g*), but smaller
than 470 would be quite good.
Can i do this by configuring the compiler options in C::B, or how could I achive that ?
Devil
phlox81:
Ok, i found now the Linker Options tab in Compiler Options, and added -s there,
brings in total a filesize of 263, which is for a hello world still a bit big, is less possible ?
polygon7:
Hi,
try to use "-s" compiler (or linker - i dont remember - i use msvc) option,
or "Strip" utility (strip --strip-all). You could merge sections and realign exe, too. Article about reducing exe size: http://www.catch22.net/tuts/minexe.asp :)
mandrav:
You might want to take a look at this thread.
Yiannis.
phlox81:
--- Quote from: mandrav ---You might want to take a look at this thread.
--- End quote ---
how could i add a call to strip each time a exe file is getting compiled ?
Devil
Navigation
[0] Message Index
[#] Next page
Go to full version