编译动态库时遇到如下错误: ... ... relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC ... could not read symbols: Bad value 解决办法编译器已经提示了:recompile with -fPIC 但是我们应该重新编译谁带上这个参数呢? 答案是:在编译.o文件的时候,而不是在编译生…