Gineann gcc -fPIC cód neamhspleách suímh (PIC) do leabharlanna roinnte.
$ gcc -fPIC [options] [source files] [object files] -o output file
Úsáid -fpic in ionad -fPIC chun cód níos éifeachtaí a ghiniúint, má thacaíonn tiomsaitheoir an ardáin leis.
Scríobh comhad foinse myfile.c :
// myfile.c
#include <stdio.h/
int
myfunc()
{
printf("myfunc\n");
}
Tógáil myfile.c Gineann myfile.o :
$ gcc -fPIC -c myfile.c
$
Advertising