www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/31/19:05:06

Message-ID: <381CCD56.28BF828D@lycosmail.com>
Date: Sun, 31 Oct 1999 18:14:30 -0500
From: Adam Schrotenboer <ajschrotenboer AT lycosmail DOT com>
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>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019