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

前端 未结 6 1675
轮回少年
轮回少年 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 14:55

    I encountered the same problem when I try to create a shared library which need to link a static library.

    I solved the problem by adding -fPIC to CXXFLAGS to compile .o files which are archived in the static library.

提交回复
热议问题