gcc -fPIC oznaka opcije

gcc -fPIC generira kod neovisan o položaju (PIC) za dijeljene biblioteke.

Sintaksa

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

 

Koristite -fpic umjesto -fPIC za generiranje učinkovitijeg koda, ako to podržava kompajler platforme.

Primjer

Napišite izvornu datoteku myfile.c :

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

 

Build myfile.c generira myfile.o :

$ gcc -fPIC -c myfile.c
$

 


Vidi također

Advertising

GCC
°• CmtoInchesConvert.com •°