Linking with shared objects

hi all !

Do I need all the shared objects to be present while compiling my code which has reference to a only one shared object, which in turn refers to another shared object.

for example I want to compile example.c which refers to sample.so
sample.so has refrence to anothersample.so

do I need to include the "anothersample.so" when linking my object file ?

gcc sample.c -o output.obj -llibsample -llibanothersample

yes, you need to link all the libraries that are being referenced, otherwise in the program where the reference is made, it will not know where to look up to find them.

Hi there
think you are getting a problem of unreferenced functionsif you are sure that your function is calling another so all have to linked for linking the options are
cc <filename> -L<Path of the so> -l<so name>
see if this help
i hope it will solve the problem