top of page
Writer's pictureZack Scanlon

Compiling

Updated: Feb 7, 2021

Pre-processor

Compiler

Assembler

Linker


Pre-processor

-It removes all the comments in your source file

-includes the header file which is a file extension which contains C function declarations and macro definitions

-Also replaces all macros


Compiler

-The compiler will take the preprocessed file and generate an intermediate representation

-That will then make a .s file but other compiler could possibly produce assembly code at this step.


The Assembler

-The assembler takes the IR code and then converts it to object code.

-That is code in machine language for example binary.

-In C++ this will make a file ending in .o


The Linker

-This will link all source files together, which is all the object code in the project. This will turn it into one single program

-The linker knows where to look for the function definitions in the static or dynamic libraries



0 views0 comments

Recent Posts

See All

Comments


bottom of page