gcc -fPIC ഓപ്ഷൻ ഫ്ലാഗ്

gcc -fPIC പങ്കിട്ട ലൈബ്രറികൾക്കായി സ്ഥാന സ്വതന്ത്ര കോഡ് (PIC) സൃഷ്ടിക്കുന്നു.

വാക്യഘടന

$ gcc -fPIC [options] [source files] [object files] -o output file

 

പ്ലാറ്റ്‌ഫോം കംപൈലർ പിന്തുണയ്‌ക്കുകയാണെങ്കിൽ, കൂടുതൽ കാര്യക്ഷമമായ കോഡ് സൃഷ്‌ടിക്കാൻ -fPIC-ന് പകരം -fpic ഉപയോഗിക്കുക.

ഉദാഹരണം

myfile.c എന്ന സോഴ്സ് ഫയൽ എഴുതുക:

// myfile.c
#include <stdio.h>
 
int myfunc()
{
    printf("myfunc\n");
}

 

Myfile.cനിർമ്മിക്കുന്നത് myfile.o : _

$ gcc -fPIC -c myfile.c
$

 


ഇതും കാണുക

Advertising

ജി.സി.സി
°• CmtoInchesConvert.com •°