gcc -shared -o hack.so hack.c/usr/bin/ld: /tmp/ccUZREwA.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC/tmp/ccUZREwA.o: could not read symbols: Bad valuecollect2: ld returned 1 exit…
编译动态库时遇到如下错误: ... ... 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文件的时候,而不是在编译生…
使用google protobuf时,出现错误 /usr/bin/ld: /usr/local/lib/libprotobuf.a(message_lite.o): relocation R_X86_64_32S against `_ZTVN6google8protobuf11MessageLiteE' can not be used when making a shared object; recompile with -fPIC/usr/local/lib/libprotobuf.a: er…
当make编译出现错误 usr/bin/ld: /data/app/openssl/lib/libcrypto.a(ecs_asn1.o): relocation R_X86_64_PC32 against symbol `ECDSA_SIG_it' can not be used when making a shared object; recompile with -fPIC 重新配置一下openssl 配置 ./config -fPIC 编译 make 安装 make install 然后…