鹅凰嶂幽云 2015-11-18 07:49 采纳率: 0%
浏览 3632

64位编译选项-shared -fPIC

我在32位编译没有出现以下错误,64位的编译,编译情况如下:
gcc -shared -fpic -pthread -I/root/proj/ipc_manager-11-3/include ....(省略)

/usr/bin/ld: common/ipc.o: relocation R_X86_64_32S against `cmd_handler' can not be used when making a shared object; recompile with -fPIC
common/ipc.o: could not read symbols: Bad value
collect2: ld 返回 1
make: *** [libipc.so] 错误 1

  • 写回答

4条回答 默认 最新

  • oyljerry 2015-11-18 08:02
    关注

    你是不是用到了库不支持64位。

    评论

报告相同问题?