Let’s say I know that some of my C/CPP files include certain headers – is there any reliable information against which libraries I will have to link, other than guessing ?
For example, if I have something like
#include "foo.h"
and want to find
libfoo_abcdef_123.so
Is there any ‘best practice’ how to do that, any place where to look at ?
Despite what the other answers here say – no, there isn’t. Libraries can (and sometimes do) redefine the same function and the only thing that can attempt to resolve such clashes is the linker, which knows zip about header files.