Library
a collectioned object file of pre-compile file that can be linked into your programs via by linker
预编译的object file集合,可以通过linker链接到你的程序中
Static Library
- 后缀".a" (archive file) in Unixes or “.lib” (library) in Windows
- copy machine code(用的到external function) into excutable file
- ar.exe可以创建static library
Shared Library
- 后缀 “.so” (shared objects) in Unixes or “.dll” (dynamic link library) in Windows
- copy only small table into excutable file
- 在开始前,操作系统external function需要的machine code(called dynamic link library)
好处:
- 节省大小
- 不需要更新app,就可以更新library
header
-
compiling source code need header file
-
linker need external references from object file or