Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Shared libraries
@ 1998-09-17  4:00 Peter Thornewell
  1998-09-18  4:00 ` Scott J. Tringali
  1998-09-18  4:00 ` Nikola Milutinovic
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Thornewell @ 1998-09-17  4:00 UTC (permalink / raw)


All,

How do I build a shared library under OSF1? The command/options etc (even
pointers to a good man page will work).

TIA,

Pete



^ permalink raw reply	[flat|nested] 7+ messages in thread
* shared libraries
@ 1995-05-22  4:00 Stefan Monnier
  1995-05-22  4:00 ` David Metsky
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 1995-05-22  4:00 UTC (permalink / raw)


How do the .a libraries work ?
While explaining to a friend about the shared libraries, he pointed out to me
"you said all the standard libs were shared, but libc is a .a so it's not
shared". Of course he was right the libc is libc.a and libc.so, but still: it's
shared. So how does it work ?

~/tmp-0> cat test.c
main ()
{ printf("hello"); }
~/tmp-0> cc -o testtata -L. test.c -ltata
~/tmp-0> cc -o testc -L. test.c -lc
~/tmp-0> ls -AlF
total 218
lrwxrwxrwx   1 monnier  dilia         15 May 22 15:37 libtata.a@ -> /usr/lib/libc.a
-rw-r--r--   1 monnier  dilia         29 May 22 14:56 test.c
-rwxr-xr-x   1 monnier  dilia      23691 May 22 15:43 testc*
-rwxr-xr-x   1 monnier  dilia     187477 May 22 15:43 testtata*
~/tmp-0> 

Obviously libtata is the exact same thing as libc. Why is libc dynamically
linked whereas libtata is statically linked ? What's the point of .so libraries
then ?


	Stefan



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Shared libraries
@ 1994-06-29  6:08 Emmett McLean
       [not found] ` <jerry.772874169@kenya>
  0 siblings, 1 reply; 7+ messages in thread
From: Emmett McLean @ 1994-06-29  6:08 UTC (permalink / raw)




  Attached below are instructions for making shared libraries
  on Sun OS4. Does anyone know what the equivalent instructions
  are on ULTRIX and OSF/1 using gcc?

  E-mail but feel free to post.

  Thanks,

  Emmett
 

   1.  Make for a subroutine/function:

      cc -PIC -c filename.c -o filename.o


   2.  Make the shared library (libtest.so.1.1)

      ld -o libtest.so file1.o file2.o file3.o -assert pure-text

      (Now rename libtest.so to libtest.so.1.1)

   3.  Linking the main program (make sure that libtest is in the LD_LIBRARY_PATH
   during runtime): 

      cc main.o -o a.out -L/yourlibdir -Bdynamic -ltest


\x1f


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-09-18  4:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-17  4:00 Shared libraries Peter Thornewell
1998-09-18  4:00 ` Scott J. Tringali
1998-09-18  4:00 ` Nikola Milutinovic
  -- strict thread matches above, loose matches on Subject: below --
1995-05-22  4:00 shared libraries Stefan Monnier
1995-05-22  4:00 ` David Metsky
1994-06-29  6:08 Shared libraries Emmett McLean
     [not found] ` <jerry.772874169@kenya>
1994-06-29 14:37   ` Burkhard Neidecker-Lutz

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