Top "Fpic" questions

`-fPIC` is a flag for the C compiler `gcc` which causes position-independent code to be produced.

GCC -fPIC option

I have read about GCC's Options for Code Generation Conventions, but could not understand what "Generate position-independent code (PIC)" does. …

c++ gcc options fpic
How to recompile with -fPIC

I was trying to reinstall my ffmpeg, following this guide, on my ARM Ubuntu machine. Unfortunately, when I compile a …

c++ gcc compilation ffmpeg fpic
What does -fPIC mean when building a shared library?

I know the '-fPIC' option has something to do with resolving addresses and independence between individual modules, but I'm not …

c++ c gcc fpic
What is the difference between `-fpic` and `-fPIC` gcc parameters?

I've already read the gcc manpage, but I still can't understand the difference between -fpic and -fPIC. Can someone explain …

gcc fpic
How can I tell, with something like objdump, if an object file has been built with -fPIC?

How can I tell, with something like objdump, if an object file has been built with -fPIC?

gcc shared-libraries objdump fpic
Recompile with -fPIC option, but the option is already in the makefile

I get this error when I do the make: relocation R_X86_64_32 against `vtable for Torch::MemoryDataSet' can not be …

makefile recompile fpic
Shared libraries and .h files

I have some doubt about how do programs use shared library. When I build a shared library ( with -shared -fPIC …

c++ c shared-libraries fpic
linker error "relocation R_X86_64_PC32 against undefined symbol" despite compilation with -fPIC

I'm compiling a c++ program using the command line g++ -c prog.cc -std=c++11 -march=native -fPIC -fopenmp and …

c++ gcc linker-errors ld fpic
Is there a way to determine that a .a or .so library has been compiled as position indepenent code?

I am getting a linking error when compiling the numpy library against lapack indicating I need to compile lapack with …

gcc position fpic