flowchart TD
A[Step 1: Define the problem to solve] --> B[Step 2: Design a solution]
B --> C[Step 3: Write a program that implements the solution]
C --> D[Step 4: Compile the program]
D --> E[Step 5: Link object files]
E --> F[Step 6: Test the Program]
F --> G[Step 7: Debug] --> D
C++ compiler goes through each source code file in the program and does 2 things:
- makes sure the files follow C++ rules.
- translates c++ code into machine language intstructions which are stored in object file (something.o).
flowchart TD
A[Source File: Calculator.cpp] --> |Compile| B[Object file: Calculator.o]
combines all the object files to produce the output file (executable file).
- reads all the object files to make sure they are valid
- resolves all cross-file dependencies.
- linkes libraries
graph TD
A[Object file: Calculator.o] --> B{Linker}
C[Object file: Fraction.o] --> B
D[Object file: Math.o] --> B
E[Other libraries] --> B
F[C++ Standard Library] --> B
B --> G[Executable file: calculator.exe]
full process of converting source code to executable file. executable produced as a result is called a build