delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/19/19:54:54

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199607192348.AA122200127@relay1.geis.com>
Date: Fri, 19 Jul 96 23:34:00 UTC 0000
To: akroev AT sn DOT no, kagel AT quasar DOT bloomberg DOT com
Cc: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: How do I create my own lib

Reply to message 1988523    from KAGEL AT DG1 DOT BLO on 07/19/96  7:54AM


>Compile your source to object files (*.o), use 'ar' (included with DJGPP) to
>build a library file named something like libMYLIB.a (the "lib" prefix and .a
>suffix are required), and run ranlib to build a symbol table in the library.
>
>
>	gcc -c my*.c
>	ar -r libmylib.a my*.o
>	ranlib libmylib.a
>	copy mylib.a \mylibdir
>
>You can then us libmylib like any other DJGPP library:

Why go through the grief of remembering to using ranlib?  Just use -rvs
instead of -r when invoking ar.  (-r = revise, v = verbose, s = create symbol
table).  Saves a bit of typing, it seems to me.  :)

John

- Raw text -


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