部分g++(gcc)オプション


オープンソースライブラリを使用したhello worldの例をコンパイルすると、いくつかのコンパイルオプションが理解されず、学習のために記録されます.
1.コンパイルオプション
g++ -std=c++11 -Wextra -Wall -pedantic -pthread -fPIC -O2 -g -I/usr/local/include/caf -o hello_world.o -c hello_world.cpp
-std:      ,    C C++    ,  c++11,  c90、c89、c99、iso9899:1999、c1x、gnu90、c++98  
-Wextra:          ,    -Wall      
-Wall:        ,         
-pedantic:          ISO C ISO C++  ,               ISO C C++   ,    -std        
-pthread:      ,   pthread 
-fPIC: PIC   position-independent code   ,            ,        
-O2:     , O2       
-g:             
-I:           
-o:        
-c:     ,      

2.リンクオプション
g++ -std=c++11 -Wextra -Wall -pedantic -pthread -fPIC -O2 -g hello_world.o -o hello -rdynamic /usr/local/lib/libcaf_core.so.0.13.2 /usr/local/lib/libcaf_io.0.13.2
-rdynamic:  -export-dynamic     ELF   ,                  (               ).       "dlopen"          callstack ,