Thread View: comp.unix.ultrix
2 messages
2 total messages
Started by Emmett McLean
Wed, 29 Jun 1994 06:08
Shared libraries
Author: Emmett McLean
Date: Wed, 29 Jun 1994 06:08
Date: Wed, 29 Jun 1994 06:08
31 lines
1455 bytes
1455 bytes
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
Re: Shared libraries
Author: Burkhard Neidecker-Lutz
Date: Wed, 29 Jun 1994 14:37
Date: Wed, 29 Jun 1994 14:37
36 lines
1823 bytes
1823 bytes
In article <jerry.772874169@kenya> jerry@tivoli.com (Jerry Frain) writes: >emclean@sfsuvax1.sfsu.edu (Emmett McLean) writes: > >> <lots of bogus stuff deleted> > First, the simple one: On ULTRIX, you can't produce or use shared libraries. End of story. Second, the other simple one: On DEC OSF/1, you don't do anything special with GCC to create shared libraries. Read the section 3 of the Programmers Guide. Basically, you just create a normal library with all the normal flags you're used to. If you later decide that the library is to your liking: libfoo.a Then: ld -shared -no_archive -all libfoo.a -none -lc -o libfoo.so This example assumes that your shared library in turn is dependent only on the C library. If other libraries are needed in turn (say the math library), these go into the section after "-none". Burkhard Neidecker-Lutz Distributed Multimedia Group, CEC Karlsruhe Advanced Technology Group, Digital Equipment Corporation neideck@nestvx.enet.dec.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads