Linux wiki

How Do I Make a Shared Library?

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/.

What Software does Linux Support?
What to Put in a Request for Help

See our index for more reviews

Write a review and win an Apple Ipod

Page

New
Edit
Rename
Attachments
Versions

Site

Changes
Index
Search

User

Log In

 
 

Last Modified 2004-07-01