Hi.

I have such problem:

$ gcc -fPIC -o foo.o foo.c
$ gcc -shared -o libfoo.so libfoo.o
$ ldd -r libfoo.so
      statically linked
undefined symbol: printf    ()
...
Program, that uses libfoo's functions linked against libc.so.6.
It works well.

libfoo uses printf (and other functions) from libc, but gcc doesn't
link shared libraries against libc.so.6 by default.

Question. Does shared library needs to be linked against the libraries,
functions from it uses?

-- 
Slava
mailto:[EMAIL PROTECTED]

Reply via email to