דגל אפשרות gcc -c

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 .

 


ראה גם

Advertising

GCC
°• CmtoInchesConvert.com •°