c++ - GCC -fPIC option - Stack Overflow
https://stackoverflow.com/questions/531151514.03.2011 · This answer is useful. 53. This answer is not useful. Show activity on this post. Code that is built into shared libraries should normally be position-independent code, so that the shared library can readily be loaded at (more or less) any address in memory. The -fPIC option ensures that GCC produces such code. Share.
gcc -o / -O option flags (output / optimization)
www.rapidtables.com › code › linuxgcc -o / -O option flags gcc -o writes the build outputto an output file. gcc -O sets the compiler's optimizationlevel. gcc -o option flag gcc -O option flag gcc -o option flag Write the build output to an output file. Syntax $ gcc [options] [source files] [object files] -o output file Example myfile.c: // myfile.c #include <stdio.h> void main()