Comments: Authenticated sender is From: "George Foot" To: Ron Penton Date: Thu, 27 Aug 1998 21:01:37 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Am I retarded -or- Why is my exe size so big?!? Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk CC: djgpp AT delorie DOT com Message-Id: Precedence: bulk On 27 Aug 98 at 12:06, Ron Penton wrote: > I'm using djgpp 2.whatever and allegro 3.0. I know that allegro has a large > overhead, but that overhead was supposed to be the same no matter how big > the the program got. I've been programming a game for a few months and all I > have is the interface and redraw functions, yet my exe size is 4.6 MEGS!! > Yikes!!! I tried undeclaring allegro stuff, but nothing happened. The only > gcc flag I'm using is -g. Can anyone help me please? The `-g' flag tells gcc to add a lot of debugging information to your executable. Run "strip myfile.exe" to remove this information before distributing your programs. Also check that you're not defining large initialised static arrays, or even uninitialised ones in C++ I think; these will be embedded in the executable. Allegro's overhead cannot exceed the size of the library file "liballeg.a" plus the size of the library file "libc.a" -- and to have all this overhead you would have to be using part of every feature in both Allegro and the C library. On my system this is 1,577,372 bytes. That leaves at least 3Mb of your executable occupied by code, data and debugging information. Personally I expect the debugging information will account for a sizable chunk of this space, and unless you have a lot of code there must be some pretty hefty data in there too. Why don't you compile your source files to .o files and look at the sizes of those? If you see any excessively large ones, have a look at their source code and try to figure out what's bloating them so much. -- george DOT foot AT merton DOT oxford DOT ac DOT uk