GCC 特性整理

1, attrib 属性

1.1 对齐指令

2,结构体名称

3,switch case 必需{}

否则会报错 a label can only be part of a statement and a declaration is not a statement

4,-fPIC 位置无关代码

其它的待整理

5, -soname

 打动态库的时候,可以加上 版本号 gcc -Wl,-soname,libdynamic.so.1 -o libdynamic.so.1.0.0 dynamic.o  -shared -fPIC 

原文地址:https://www.cnblogs.com/ningci/p/8846974.html