From: dontmailme AT iname DOT com (Steamer) Newsgroups: comp.os.msdos.djgpp Subject: Re: why exe files so big?? 400k! Date: Fri, 30 Jun 2000 08:25:03 GMT Organization: always disorganized Lines: 30 Message-ID: <395c595c.3922807@news.freeserve.net> References: NNTP-Posting-Host: modem-118.singapore-angel.dialup.pol.co.uk X-Trace: newsg4.svr.pol.co.uk 962353504 8953 62.136.220.118 (30 Jun 2000 08:25:04 GMT) NNTP-Posting-Date: 30 Jun 2000 08:25:04 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Kalum Somaratna aka Grendel wrote: > > (a) Use C instead of C++. (I assume you must be using C++ because > > I can't imagine how you get such huge executables using C.) > > Hmm..I thought that this problem only occured with Binutils 2.81? Well, it happens to me even with 2.10 (which, due to peculiar numbering conventions, is later than 2.81). Try it yourself: the following should compile to about 271KB (before stripping or compressing) compared to about 92KB for an equivalent C program: // Hello World for C++ #include using namespace std; int main(void) { cout << "Hello, world!" << endl; return 0; } > About getting large executables using C..well just have a look at any > program that uses the Allegro library....... This is true. But the original poster mentioned that one of his 4OOKB programs just adds two numbers and displays the result. I assumed he hadn't felt the need for add-on libraries to accomplish this. S.