shared object

Hi,

I would like to create a shared object ( .so).

This shared object

  1. uses the functions from a library.
  2. Also it should be able to use the global variable in an app

To achieve this what should I do ? 1) To use the functions in the library should I give the -ld option while creating the object file itself ?

2) To share global variable b/w application and .so should I use IPC ? If yes which IPC should I use ?

Thanks,

See Shared Libraries