Steps of a C Program Compilation
• Step 1 – Run the Preprocessor • Deals with #include, #define, #ifndef, …
• Step 2 – Compile C code into Machine Code • Step 2a – Lexical Analysis • Step 2b – Parsing and Semanitic analysis • Step 2c – Creation of Machine Code in Object File
• Step 3 – Create the Executable Files • Linking the Program Object Files with Library Object Files Steps of a C Program Compilation • Step 1 & 2 – Create the Object Files • .o files • created using the –c flag in gcc (“compile only”) • Step 3 – Create the Executable Files • By default, named: a.out • use the –o flag in gcc to call it something other than a.out
Get Free Quote!
407 Experts Online