gcc -c אוסף קבצי מקור ללא קישור.
$ gcc -c [options] [source files]
כתוב את קובץ המקור myfile.c :
// myfile.c
#include <stdio.h>
void main()
{
printf("Program run\n");
}
קומפיל את myfile.c :
$ gcc -c myfile.c
קומפילציה זו יצרה קובץ אובייקט myfile.o .