[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: regarding shared object



Hi Ramesh,

> I want to know the importance of .so(shared object)files.
> Is it similar to dll files in windows
You've answered you question :) yup, they are like dll's in Windows.

>How to compile the c code to .so .
if you have foo.c from which you want to build foo.so you'll need to :
cc -c foo.c
to get the object file. The .so is created at link stage (much like the
executables are). to get the .so you'll need to :
ld -shared foo.o 
other related options to ld would be -soname, and -o
Pls see man ld for more info.

To be able to use this your .so must have the appropriate hooks, and 
your appliation must make the right calls which varies from architecture
to architecture...

hth
BGa

---
Send e-mail to 'ilugc-request@xxxxxxxxxxxxxxxxxx' with 'unsubscribe' 
in either the subject or the body to unsubscribe from this list.