How do libraries work at compile & link times

This question already has an answer here:

  • How does the compilation/linking process work? 5 answers

  • 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).
  • 链接地址: http://www.djcxy.com/p/73302.html

    上一篇: 头文件如何连接到相应的.cpp文件?

    下一篇: 图书馆如何在编译和链接时间工作