"Recompile with -fPIC" - 但是使用 -fPIC 重新编译无法修复

"Recompile with -fPIC" - But recompiling with -fPIC doesn't fix

本文关键字:-fPIC 编译 with Recompile 新编译      更新时间:2023-10-16

GCC Error:

relocation R_X86_64_32S against `ebx' can not be used when making a shared object;
recompile with -fPIC

即使我确保设置了-fPIC标志。

如果您试图编译包含内联汇编的文件,请确保在寄存器前没有丢失%符号。

确保在链接线上使用-fPIC。有时模板由链接器编译。

错误信息应该是"without -fPIC"