Date: Sun, 17 Aug 1997 20:01:06 +0300 (IDT) From: Eli Zaretskii To: Vlatko Surlan cc: djgpp AT delorie DOT com Subject: Re: Changes the size of exe or not? In-Reply-To: <5t539o$2ra@bagan.srce.hr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 16 Aug 1997, Vlatko Surlan wrote: > Is there any way to solve this or I have to wrrite new > file with only the functions I need every time I do new stuff?? > Did somebody wrotte something that could on the base of > used functions in a programme ( which ain't standard ) > writte a new file containing only functions that I need > and of course new .h file for it or I have to do it. Yes, such a way exists. It is called ``object file libraries''. You put every function on its separate source file and compile it. You then put all these .o object files into a library using the `ar' archive utility which comes with DJGPP: ar rvs mylib.a *.o You then submit the name of that library when you link your programs. For example: gcc -o myprog.exe f1.c f2.c mylib.a The linker will only link in the functions that your program calls.