Date: Thu, 17 Sep 1998 16:52:50 +0300 (IDT) From: Eli Zaretskii To: Rylan cc: djgpp AT delorie DOT com Subject: Re: Excluding unused Allegro Functions In-Reply-To: <6tnk2k$7vm$3@news2.saix.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 16 Sep 1998, Rylan wrote: > I recently noticed while using FSDB that, when debugging Allegro code (I > just looked at one of my Allegro using programs) that there are functions > and routines included in the final .EXE that I do not use AT ALL in the > program - so I want to ask too if there is anyway to exclude these unused > library functions, not just for Allegro but any library from the final > resulting .EXE? The linker cannot load part of an object module. So, if a single .o file stored in a library defines several functions, it loads all of them, even if your program only needs one of them. You cannot do anything to prevent that. However, the DJGPP library usually makes a point of putting every function on its own module, unless they cannot be separated. A notable exception is the conio functions (cprintf, cputs, gotoxy etc.): they are all defined on a single module. But the conio functions are so intertwined and call one another so many times, that you cannot easily separate them anyway.