基本术语

The three basic tools used to build C++ applications are the compiler, the linker, and the archiver (or librarian).

 

The compiler takes C++ source files as input and produces object files, which contains a mixture of

machine-executable code and symbolic references to functions and data.

 

The archiver takes a collection of object files as input and produces a static library, or archive, which is

simply a collection of object files grouped for convenient use.

 

The linker takes a collection of object files and libraries and resolves their symbolic references to produce

either an executable or dynamic library. Roughly speaking, the linker operates by matching each use of

symbol to its definition.

 

A dynamic library, also called a shared library, is like an executable except that it can't be run on its

own; it consists of a body of machine-executable code that is loaded into memory after an application

is started and can be shared by one or more applications.

 

On Winodws, dynamic libraries are also called dynamic link libraries (DLLs).

 

The object files and static libraries on which an executable depends are needed only when the executable

is built. The dynamic libraries on which an executable depends, however, must be present on a user's

system when the executable is run.


基本术语_第1张图片
 

 

 

 

 

 

 

 

你可能感兴趣的:(C++,compiler,linker,archiver)