Is there a manual or a method available to find out which file libXX.so contains the functions and so on from the header YYY.h ?
For example:
I include a header foo.h with the function foofunk() inside.
But the linker says undefined reference to foofunk().
Note:
I want to use a Makefile for the build and link process. (GCC)
And my sources are in C, but that should be unimportant.
Use objdump.
Now loop over shared libraries you suspect of defining a given function and check each of them using objdump.
Remove
breakif you want to continue searching despite having found the library you’re looking for.In case of static libraries substitute
-Twith-tand get rid of one ofgreps.