GCC C programming build and execute in Linux environment

Опубликовано: 29 Октябрь 2024
на канале: Real Time Signals
621
18

GCC compiles a C/C++ program into executable in 4 steps as
Pre-processing: via the GNU C Preprocessor (cpp.exe), which includes the headers (#include) and expands the macros (#define).

Compilation: The compiler compiles the pre-processed source code into assembly code for a specific processor.

Assembly: The assembler (as.exe) converts the assembly code into machine code in the object file.

Linker: Finally, the linker (ld.exe) links the object code with the library code to produce an executable file .out