linux编译问题集锦(持续更新中)

it2026-01-20  9

问题:fileappender.o relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPI 解决:

使用 ar -x liblog4cplus.a 解包readelf --relocs fileappender.o | egrep '(GOT|PLT|JU?MP_SLOT)' 如果输出为空,则该静态库没有position-independent,需要在该静态库的编译脚本添加 -fPIC

转载于:https://www.cnblogs.com/octave/p/4824584.html

最新回复(0)