On Tue, Jul 12, 2011 at 17:37:57 +0300, Baruch Burstein wrote: > The website (http://www.sqlite.org/about.html) says that sqlite can be > compiled to under 300K. I am using mingw32, and with no configuration did I > manage to get sqlite3.o below 400k. What compiler/compiler options are used > to reach <300K?
In my experience, the .o files are significantly larger than the resulting binary. Depending on various circumstances, the object (and static library) can be from 20% to over 10 times larger than the resulting binary. This is because it has to contain a lot of information the linker need to properly put everything together, but which will not appear in the final binary. Debugging information is usually responsible for the larger differences, so if you compile the .o without -g, the reduction won't be that big, but it's quite expected that 400kB .o will not add more than 300kB to the binary it's linked to. Also don't forget to run the final binary through strip to really get rid of all unnecessary symbol information. It will make crash dumps from it make no sense at all, but it's possible to use objcopy to save the information strip would remove in a separate file which gdb can use to interpret core dumps. -- Jan 'Bulb' Hudec <b...@ucw.cz> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users