On Thu, May 21, 1998 at 10:03:46AM +0500, Pankaj Kumar R wrote:
> hi all,
> i first create a object file
> $ cc -c mylib.c
> then i compile test.c like this ,
> $ cc -o test test.c mylib.o
>
> what i would like to know is if there is a way to put the library mylib.c
> into the /usr/lib/ directory where other libraries reside. then anyone
> hooked to my computer could just specify something like
> $ cc -o test test.c -lmy
Do:
ar -rv mylib.a mylib.o
then as root:
cp mylib.a /usr/lib
This creates a STATIC library. To make your own shared library, you'll
have to read up a bit. One place to start is the 'gcc' man pages.
Fred
--
---- Fred Smith -- [EMAIL PROTECTED] ----------------------------
"Not everyone who says to me, 'Lord, Lord,' will enter the kingdom of
heaven, but only he who does the will of my Father who is in heaven."
------------------------------ Matthew 7:21 (niv) -----------------------------
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.