/usr/bin/gcc
in the shell. If the location of gcc
is in your PATH
, you can simply type gcc
and
the OS will resolve the full path.Compile source files into executable
> gcc src1.c src2.c --output executable
hello.c:
Preprocess, compile, assemble, and link our program to the file
hello
We now have a new executable file. We can run it in the shell as:
Compile source code into Assembler instructions:
Compile source code without linking: