Relocation R_X86_64_32S against `.rodata' … While compiling on 64-bit platform

前端 未结 6 1648
轮回少年
轮回少年 2020-12-28 14:36

So I\'ve been coding something on 32-bit and yesterday I needed to build a dll and I had a couple of problems with that. Anyway I solved them here.

Unfortunately eve

6条回答
  •  一生所求
    2020-12-28 15:02

    The solution was to compile everything with -fPIC, and link shared objects with -shared.

    Add -fPIC to CFLAGS or CXXFLAGS for make-based projects.

提交回复
热议问题