天天看点

libgsm.a relocation R_X86_64_PC32 can not be used when making a shared object; recompile with -fPIC

错误如下:

/usr/bin/ld: /home/quantum6/telecom/build_libs/lib/libgsm.a(long_term.o): relocation R_X86_64_PC32 against symbol `gsm_DLB' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/quantum6/telecom/build_libs/lib/libgsm.a(rpe.o): relocation R_X86_64_PC32 against symbol `gsm_FAC' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status      

解决办法,修改Makefile。参考

https://blog.csdn.net/quantum7/article/details/104087285

继续阅读