From: John Simon Churchill Newsgroups: comp.os.msdos.djgpp Subject: Excluding Unused Functions from EXE Date: Mon, 14 Sep 1998 09:44:38 +0100 Organization: BT Labs, Martlesham Heath, Ipswich, UK Lines: 38 Message-ID: <35FCD776.759A@hotmail.com> Reply-To: simon_churchill AT hotmail DOT com NNTP-Posting-Host: pc5685.btlabs.bt.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk if I have a file with 3 function in and I only use one how can I compile the exe so it only includes the code for the functions I call , do I need certain command line options to GCC ie. I have the following three files and only want first(), thanks in advance Simon... -------------------------- testmain.c -------------------------- #include "test.h" int main(void){ first(); return(0); } -------------------------- test.h -------------------------- void first(void); void second(void); void third(void); -------------------------- test.c -------------------------- void first(void){ int x; x=0x37; } void second(void){ int x; x=0x37; } void third(void){ int x; x=0x37; } --------------------------