Message-ID: <381CCD56.28BF828D@lycosmail.com> Date: Sun, 31 Oct 1999 18:14:30 -0500 From: Adam Schrotenboer X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: How do I make a library in DJGPP? References: <7vhlla$ep7$1 AT rohrpostix DOT uta4you DOT at> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com What is needed is the std djgpp utils pkg, including ar and ranlib. Then compile the sources, but don't link them. (This is adapted from the make.bat from gmp) type at the command prompt: ar rc library.a source1.o source2.o source3.o ranlib library.a This can also be put into a shell script (if you know how to write them. They're not difficult, just a little tricky at first) I do believe that you could skip the ranlib if you change the "ar rc" to "ar rcs" You still need your header files (with function prototypes _ONLY_) to be #includ'ed in your programs, and then you have to link the library into your final executable. Roland Moritz wrote: > Currently I am using header files or split-up source code files to store > funtions I use often, but I would like to put them into libraries, so how > can I do this in DJGPP? > > Thanks, Roland Moritz