My project uses many libraries like libjpeg, libpng and more. With all of these libraries linked statically and with many .cpp files of my project, a big binary executable is predictable.
I'm impressed when I was remove the code inside 'main(...)' and all of the includes, but executable size doesn't change, at all. There are many *.cpp files but in test.cpp which implements 'main' there is only this code: ----test.cpp-------- int main(int argc, char **argv) { return 0; } -------------------- size for this executable is about 290KBs and inside binary I recognize parts of zlib library. I use zlib library in other .cpp file than test.cpp, but I don't call anything from this file and if I remove it, all work ok and size decreases. If I remove all files except test.cpp, it compiles fine and size is 10KBs. So the question is why linker include useless binary objects to final binary executable. My compiler/linker is mingw-g++, if does matter. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus