gcc -fPIC luo sijainnista riippumattoman koodin (PIC) jaetuille kirjastoille.
$ gcc -fPIC [options] [source files] [object files] -o output file
Käytä -fpic -fPIC:n sijaan tehokkaamman koodin luomiseksi, jos alustan kääntäjä tukee sitä.
Kirjoita lähdetiedosto myfile.c :
// myfile.c
#include <stdio.h>
int
myfunc()
{
printf("myfunc\n");
}
Build myfile.c luo myfile.o :n :
$ gcc -fPIC -c myfile.c
$
Advertising