www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/01/04:30:02

Date: Wed, 1 Jul 1998 11:29:53 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Plamen Petkov <pbpetkov AT iname DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Making Libraries
In-Reply-To: <35995863.F2E5A25E@iname.com>
Message-ID: <Pine.SUN.3.91.980701112930.12487S-100000@is>
MIME-Version: 1.0

On Tue, 30 Jun 1998, Plamen Petkov wrote:

> My question is: What switches do I need to use to make a library,
> instead of an executable?

It's not a question of different switches, you need to use another
program: `ar', instead of `ld' or `gcc'.

Assuming that you have object files file1.o, file2.o and file3.o,
here's how you put them into a library called libmyfiles.a:

       ar rvs libmyfiles.a file1.o file2.o file3.o

`ar' comes with documentation, type "info binutils ar" from the DOS
prompt to read about ity.

- Raw text -


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