From: "Smith A. Cat" Newsgroups: comp.os.msdos.djgpp Subject: Re: Size of executable too large. Date: 28 May 1997 20:17:02 -0700 Organization: Blue Square Laboratories Lines: 35 Message-ID: <338CF8C3.1F2F@primenet.com> References: <338CF04B DOT EFB AT tiac DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Claude Sassine wrote: > > I compiled a 699-byte file and got a 140KB executable. This led to look > at the FAQ files. The FAQ mentions two possible remedies for the size > problem. The -s switch brought the executable's size down to 68KB. The > other option stated: etc. etc. etc... this same post appears SO many times, maybe the faq should just say: DJGPP is a 32 bit compiler that makes really fast running executables! unfortunately, this entails some overhead in terms of file size. (the memory image of a given program will be QUITE SMALL for a 32-bit app, compared, say, to a DOS4GW exec.) if you feel you must have a smaller than usual file, compile with the -s option and then run the DJP file compressor. this will make the file smaller. (your 68kb file would then be about 40k). if you simply want the smallest executable from a C program, try using MicroC, a shareware compiler, which I used recently to make: #include void main(void){outw(0x310, 32767)} which sends a zero voltage to my 50 ton press :-) which compiled to a 400 byte com file. but i think its only a 10 byte exe if you do it in assembler! but if you want to make really nice programs with graphics and monstrous arrays and shell-out and drop PCX files and stuff, you won't worry about the exe size, because DJGPP & Allegro do this better than anything! phil