LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

FAQS
 FAQs
Apache FAQ
Linux FAQ
XML FAQ

Log in to particpate






   Linux FAQ > 6. Porting, Compiling and Obtaining Programs
Question:  6.11. How To Make a Shared Library.
Answer:

For ELF,

   $ gcc -fPIC -c *.c
   $ gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o


For a.out, get tools-n.nn.tar.gz from tsx-11.mit.edu/pub/linux/packages/GCC/src/. It comes with documentation that will tell you what to do. Note that a.out shared libraries are a very tricky business. Consider upgrading your libraries to ELF shared libraries. See the ELF HOWTO, at ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/


This FAQ is from Linux Frequently Asked Questions with Answers, maintained by Robert Kiesling

Sponsored by: