Date: Mon, 5 Oct 1998 21:59:28 +0100 (BST) From: George Foot To: DoctorXV AT aol DOT com cc: djgpp AT delorie DOT com Subject: Re: Allegro for TC++? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 5 Oct 1998 DoctorXV AT aol DOT com wrote: > Is there a grpahics library like Allegro for Turbo C++? I have DJGPP but I > hate it's outrageous file output size of 250k for just "Hello, World!" if I am > doing it in C++. But in TC++ the file is only 5kb. Anyway...is there any > graphics library for Turbo C++? You are being unreasonable. Firstly, you can reduce the size of that program considerably if you stop using sledgehammers to crack nuts. Secondly, much of that `bloat' is in fact just a fixed overhead -- if you make it print "Hello, World!" again, the program won't double in size. It shouldn't increase much at all. If your aim is to develop a program that just prints a line of text on the screen in as few bytes as possible, don't use djgpp. Don't use Turbo C either. Both will link in libraries you don't need to be using. DJGPP wasn't designed to make miniature "Hello world" programs, it was designed to write powerful 32-bit applications, in particular ports of Unix applications. If you want to use a flat memory model, 32-bit protected mode and the best DOS-based graphics library ever, you must live with the overhead. Note that Allegro itself adds a significant overhead to your programs, beacuse by default it includes support for a wide range of hardware. If you can be sure that you don't need all this support, you can disable some of it and prevent it from being included in your executable. For example, if you're using 320x200x256 mode then you only need one of the video drivers and one of the colour depths. See Allegro's documentation for information on this. Also note that DJGPP programs can be large for other reasons -- maybe you included verbose debugging information (`-g')? Try running `strip' to remove all the debugging information from the executable. Also in C++ programs static arrays are included in the executable in full, even if they are uninitialised -- try making them dynamic instead, or running the `djp' executable compressor (package `mlp*b.zip'). Also refer to the FAQ chapter 8 -- several sections there deal with these problems. -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html