jaylad
jaylad

Reputation: 61

How do libraries work at compile & link times

Im new to c++, getting an understanding on how libraries work, i know what a library is, but i was hoping for a quick summary of how it works at both compile time and link time?

Upvotes: 1

Views: 535

Answers (1)

erikalds
erikalds

Reputation: 53

Short answer:

  • At compile time you compile your program using the library's headers.
  • At link time the linker basically looks up the symbols that the compiler found in the library's headers in the library's binaries so that your program knows what code in the library's binaries to execute when your program uses symbols from that library (at run time).

Upvotes: 1

Related Questions