Friday, January 31, 2020

gcc important preprocess , compile and assemble options

-E stop after the preprocessing stage; The output is in the form of preprocessed source code, which is sent to the standard output.
-S Stop after the stage of compilation, don't assemble. The output is in the form of an assembler code file.
-c Compile or assemble the source files
-o If this option is not specified, the default is to put an executable file in ‘a.out’, the object file in ‘source.o’, assembler file in ‘source.s’, a
precompiled header file in ‘source.suffix.gch’, and all preprocessed C source on standard output.