Context: a classic linux system (archlinux) with a gcc toolchain
My program (let's call it P
) depends on a shared lib of mine (let's call it "foo" or libfoo.so
)
libfoo.so
got a public header foo.h
and P
includes it in one of its files.
libfoo.so
depends on the pthread
lib for several public functions (among other functions present in foo.h
) but P does NOT use those functions.
The problem is, when I link P with libfoo.so, the libpthread is requested and I don't understand why and how to fix this.