How to create shared libray in UNIX

Hello Experts,

           I want to know, how to create a shared libs \(.so file\) in Linux/UNIX ,

If i ve files like below

  1. adc_mdl.cc----2. adc_mdl.h
  2. agc_mdl.cc----4. agc_mdl.h
  3. ue_mdl.cc----- 6. ue_mdl.h
  4. dcc_mdl.cc---- 8. dcc_mdl.h
  5. ue_afe_mdl.cc-10. ue_age_mdl.h
    11.ue_rf_mdl.cc---12. ue_rf_mdl.h

Please help me with code or I need to make a MAKEFILE to do that.

See this link - Shared Libraries

Taking a step back - How to write Shared Libraies

Thanks for the links .

I ll go through that..

Dear Vino,

    I tried with these two commands to create shared library..

1.gcc -fPIC -g -c -Wall hello.c
2. gcc -shared -Wl,-soname,libmystuff.so.1 -o libmystuff.so.1.0.1 hello.o -lc

But when I am trying the second command It is showing the following errors.

ld: warning: option -o appears more than once, first setting taken
ld: fatal: file libmystuff.so.1: open failed: No such file or directory
ld: fatal: File processing errors. No output written to libmystuff.so.1.0.1
collect2: ld returned 1 exit status

I am using UNIX.

Please need help ......

user_prady