Message-ID: <3E775D4F.EBA1B8E3@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Question? References: <20030318154745 DOT 95358 DOT qmail AT web40802 DOT mail DOT yahoo DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 31 Date: Tue, 18 Mar 2003 18:51:47 GMT NNTP-Posting-Host: 12.90.170.15 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1048013507 12.90.170.15 (Tue, 18 Mar 2003 18:51:47 GMT) NNTP-Posting-Date: Tue, 18 Mar 2003 18:51:47 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com adel khaleghi wrote: > > I have a question. > > I compiled following code with gcc and borland c compiler: > > #include > > int main(void){ > printf("Hello world!"); > return 0; > } > > gcc a.c -o a.exe (for gcc compiler under windows) > > the size of exe file that gcc maked (80KB) and the > size of exe file that borlandc maked (8KB) . why??? DJGPP is including lots and lots of run-time code to make the underlying system function very much like Unix/Linux/Posix, and is probably including lots of debug information. You don't specify which BC you used, but it isn't doing all that. For another level, you can create the same program in under 30 bytes with assembly. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!