|
这可能是你前面的某些 o 文件使用了 -fminshared 编译选项:
fminshared
Specifies that a compilation unit is a component of a main program and should not be linked as part of a shareable object.
导致您不能在链接的时候使用 -fPIC (地址无关)选项。
因为这俩选项是矛盾的。
你可以试试:
1. 先 make clean 然后重新 make
2. 如果前面的编译过程用到了 -fminshared 选项,则去掉该选项。
3. 如果是别人编译的目标代码,用到了 -fminshared 而你无法修改。那么可以尝试去掉 -fPIC
4. 如果你去掉了 -fPIC,也许在某些CPU上,或内存里有多份 .so 时,会有一些问题。
|
|