From: Doug Hockin <doug.hockin@wang.com>
Subject: Re: How to make a dynamic linked library?
Date: 1999/04/23 [thread overview]
Message-ID: <3720B83D.BD17BAB2@wang.com> (raw)
In-Reply-To: 3719391A.47B64999@hopper.math.uwaterloo.ca
I don't have experience with the GNU compiler but can give
suggestions for SVR4 and they are probably similar.
Compile the program with the -Kpic option to produce position
independent
code. Then link it with -dy (to get it dynamically linked) and -G (to
make it a shared library).
When you compile/link the programs that will use the library you need
to link them
with a -l option. If you name your library libmine and put it into
/usr/lib then you can use -lmine. If you put the library somewhere
else you'll also need to use -Lpath to specify the path to your library.
The -L option should precede the -l option on the command line.
-- Doug
next prev parent reply other threads:[~1999-04-23 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-17 4:00 How to make a dynamic linked library? Huizhu Liu
1999-04-23 4:00 ` Doug Hockin [this message]
1999-04-23 4:00 ` tomx
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