如何编译静态链接未使用-fPIC编译的库的共享对象?

时间:2015-01-21 17:12:58

标签: c++ g++ shared-libraries

我无法重新编译有问题的库,因为它是由不提供源代码的供应商提供的,只有他们的.a文件。

有没有办法在我的共享对象中包含他们的静态库,需要-fPIC

尝试此操作时,我会生成此错误:

/usr/bin/ld: /path/to/lib/libtheirs.a(theirs.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /path/to/lib/libtheirs.a: could not read symbols: Bad value

0 个答案:

没有答案