From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,997b03735e084fc1,start X-Google-Attributes: gidfee84,public X-Google-Thread: 10b612,997b03735e084fc1,start X-Google-Attributes: gid10b612,public X-Google-Thread: 10ba33,997b03735e084fc1,start X-Google-Attributes: gid10ba33,public X-Google-ArrivalTime: 1994-06-28 23:22:50 PST Path: bga.com!news.sprintlink.net!hookup!usc!howland.reston.ans.net!agate!library.ucla.edu!csulb.edu!csus.edu!sfsuvax1.sfsu.edu!emclean From: emclean@sfsuvax1.sfsu.edu (Emmett McLean) Newsgroups: comp.unix.ultrix,gnu.g++.help,comp.unix.osf.osf1 Subject: Shared libraries Date: 29 Jun 1994 06:08:15 GMT Organization: San Francisco State University Message-ID: <2ur34f$fc5@news.csus.edu> NNTP-Posting-Host: sfsuvax1.sfsu.edu Xref: bga.com comp.unix.ultrix:2351 gnu.g++.help:1760 comp.unix.osf.osf1:2276 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