![]() |
![]() |
![]() |
![]() |
![]() |
|
Later, you use the C++ compiler again to link the object files into an executable program:
trains.o containers.o cars.o
*--------------* *--------------* *--------------*
| Compiled | | Compiled | | Compiled |
| main | | member- | | member- |
| definition | | function | | function |
| | | definitions | | definitions |
*--------------* *--------------* *--------------*
| | |
| *-----------------------* |
| | *--------------------------------------------*
| | |
v v v
analyze_train
*--------------*
| Executable |
| program |
*--------------*
The process of linking object files requires relatively little work compared to the work required to produce object files from source-code files.