Discussion Forum

How does the linker resolve symbols?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Cactus Blip
Posted
10-Jul-2009 14:41 GMT
Toolset
None
New! How does the linker resolve symbols?

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

Read-Only
Author
Mike Kleshov
Posted
10-Jul-2009 15:14 GMT
Toolset
None
New! RE: How does the linker resolve symbols?

Linkers don't know anything about header files, those are for the compiler. Normally, linkers scan standard libraries automatically.

Read-Only
Author
Cactus Blip
Posted
10-Jul-2009 15:19 GMT
Toolset
None
New! RE: How does the linker resolve symbols?

Thanks.

Read-Only
Author
Andy Neil
Posted
10-Jul-2009 16:37 GMT
Toolset
None
New! linkers scan standard libraries automatically

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!)

Next Thread | Thread List | Previous Thread Start a Thread | Settings