Thomas and Jim, Most of the time, the executable size is dominated by the linked in libraries, which are usually a lot bigger than the source. However, the size of the executable is very dependent on the programming language used and can be either bigger or smaller than the source code depending on the language. The target machine is also a big factor in the executable size.
For example, assembly language programs almost always compile down to smaller machine code; however, basic programs almost always compile down to much larger programs than the original source, even including comments. This is because assembly language is a very detailed, low level language, wheras in basic a single print statement can require hundreds or thousands of instructions to be compiled correctly. As a real world example, the Alter Aeon server code is written in c++, and the source code size is 9.5 megabytes. The final executable is 14.3 megabytes. This is a particularly good example, because the server uses very few libraries and is the executable size is almost completely server code instead of library code. This is on a 64 bit linux machine. Our previous host server was a 32 bit server, and on 32 bit machines the executable size would only be about ten megabytes instead of 14. In summary, It's really hard to make general assumptions about executable versus code size like 'compiled code is always smaller than the source'. The different languages and architectures allow for extremely wide variation. Just FYI. Dennis Towne Alter Aeon MUD http://www.alteraeon.com On Mon, Feb 20, 2012 at 10:43 AM, Thomas Ward <thomasward1...@gmail.com> wrote: > Hi Jim, > > Hmmmm....I see what you mean. I wonder if perhaps when VB compiles > your executable files if it does statically link some libraries > resulting in the extra file size. > > I know if I statically link some lib files, compile them directly into > the executable, naturally my exe file is larger because of the > statically linked libraries. > > For instance, all of my games written in C++ statically link to a > library named g3d.lib. The g3d.lib library is my Genesis Engine. > Obviously, any games I write will be larger when compiled because the > lib gets compiled directly into the executable as well as the source. > > I'm thinking VB probably has some default static libs it includes > automatically that might account for the extra file size. I'm not > sure, but that's my theory. :D > > Cheers! > > On 2/20/12, Jim Kitchen <j...@kitchensinc.net> wrote: >> Hi Thomas, >> >> Actually the opposite is true, my compiled executable files are always much >> larger than my source code files. But that was not my point at all. It is >> that some times the source code file compiles larger than other source code >> and vice versa. Such as; >> >> starmule frm 43,936 bytes >> spanker frm 70,513 bytes >> >> spanker exe 163,840 bytes >> STARMULE EXE 237,568 bytes >> >> BFN >> >> Jim >> >> Hey you know that Mac you got, is it a big Mac? >> >> j...@kitchensinc.net >> http://www.kitchensinc.net >> (440) 286-6920 >> Chardon Ohio USA >> > > --- > Gamers mailing list __ Gamers@audyssey.org > If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. > You can make changes or update your subscription via the web, at > http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org. > All messages are archived and can be searched and read at > http://www.mail-archive.com/gamers@audyssey.org. > If you have any questions or concerns regarding the management of the list, > please send E-mail to gamers-ow...@audyssey.org. --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gamers@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org.