zettelkasten

Compilation And Execution In C

Last updated: 1/9/2025

This is how compilation and execution work in C++:

Start out with your C++ program, Then the preprocessor (the thing that works with the # statements) pretty much adds in the C++ code from the header files into your main.cc file. Then the compiler takes that code and does syntax and types checks It turns that code into assembly code with a dot.s extension The assembler then turns that code into object code to run on your machine (also called machine code). After doing this for every file you want to turn to machine code The linker links the codes together 😃

Related flags:

To stop at the compilation stage use -S To stop after the assembly stage use -c

See Also

  1. [[c]]
  2. [[computer-science]]