The compiler's job ends on the last line of each source code file. A header file describes a function for the compiler, not the linker.
The linker, static or runtime, uses only the function's name to resolve references. Function parameters and semantics are invisible to it.
The programmer and, to a lesser degree, the sysadmin direct the choice of which library to link to an executable. A missing function will prevent execution. A wrong function will promote wrong execution. Don't do that.