We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
How does the linker make the exact link between the contents of the header file and a library function it needs? in other words, if I include, say, <string.h>, how does the linker know which library to refer to, or maybe it scans all the available ones?
Thanks
Linkers don't know anything about header files, those are for the compiler. Normally, linkers scan standard libraries automatically.
Thanks.
plus any specific library(ies) that you specify on the command line (or in your IDE project options).
There may also be an otion to scan folders for libraries...
RTLM (Read The Linker Manual!)