Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: George Chaltas <chaltas@fluid.mro.dec.com>
Subject: Re: How to make a shared library
Date: 28 Feb 1995 16:28:58 GMT	[thread overview]
Message-ID: <3ivj0a$7i6@mrnews.mro.dec.com> (raw)
In-Reply-To: 3iqblv$4ik@info.epfl.ch

"Stefan Monnier" <monnier@di.epfl.ch> wrote:
>
> I looked in the ld manpage and such but could quite understand how to make a .so
> library. I'm probably dense but still...
> 
> Anyboy could tell me what command to use instaed of 'ar rv' ?
> 
> 
> 	Stefan

Sure -- as you suspected, you use ld(1) to create shared libraries.
The manual will give you all the gory details, but here are some
simple examples:

Example 1 - create a shared library from two object files:

  ld -o mylib.so obj1.o obj2.o -shared

Example 2 - create a shared library from an archive:

  ld -o mylib.so -all myarchive.a -shared

  The -all flag tells the linker to incorporate all the modules in
the following archive, rather than just using those modules necessary
to resolve previously referenced symbols.  In example 2 (above),
if the -all flag were ommitted you'd end up with an empty shared
library.

For more than you ever wanted to know about shared libraries, see
section 3 of the "DEC OSF/1 Programmer's Guide", which is on
the Operating System distribution CD.   Section 3.5 deals specifically
with creating shared libraries.

		George Chaltas
		Digital Equipment Corporation



  reply	other threads:[~1995-02-28 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-02-26 16:53 How to make a shared library Stefan Monnier
1995-02-28 16:28 ` George Chaltas [this message]
1995-03-02 13:45 ` Gilles Vandenbeuck
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox