From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6134f6adefe7e77c X-Google-Attributes: gidfee84,public From: john@avante.WPI.EDU (John Stoffel) Subject: Re: How do I make a dynamic shared library? Date: 1995/06/09 Message-ID: #1/1 X-Deja-AN: 104152241 distribution: world references: <3r92ec$2b0s@unixfe.rl.ac.uk> organization: Worcester Polytechnic Institute newsgroups: comp.unix.osf.osf1 >>>>> "S" == S R Crothers writes: In article <3r92ec$2b0s@unixfe.rl.ac.uk> steve@eiscatc.ag.rl.ac.uk (S R Crothers) writes: S> What commands do I need to give to create and subsequenty use S> dynamic shared libraries? I notice that the system files in S> /usr/shlib give as the output to the file command S> COFF format alpha shared library, demand paged executable or object S> module not stripped - version 3.11-4 S> but none of the options I have seen for ld seem to create one of these. All you need to do is build build your modules, then link them together into a shared library using the proper flags. This isn't explained too well in the ld man page, but once you know what to do, it's pretty simple. For example: ar rcu tmp.a foo.o bar.o ld -o libtmp.so -shared -expect_unresolved "*" -s -all tmp.a The -expect_unresolved "*" isn't really needed, but it does serve to keep ld quieter. Hope this helps. John John F. Stoffel - john@wpi.edu - 508-831-5512 - FL 111F Workstation Specialist - Worcester Polytechnic Institute College Computer Ctr. Kill your television