gcc -c compileert bronbestanden zonder te linken.
$ gcc -c [options] [source files]
Schrijf bronbestand myfile.c :
// myfile.c
#include <stdio.h>
void main()
{
printf("Program run\n");
}
Compileer mijnbestand.c :
$ gcc -c myfile.c
Deze compilatie genereerde het objectbestand myfile.o .