如何解决在Debian下链接static会导致与PIC有关的错误-不是其他Linux发行版
我在许多不同的Linux发行版中编译我的C ++应用程序。使用Debian 9时,编译器抱怨我要使用PIC选项链接到的静态库:
/usr/bin/ld: /senselockAPI/Linux_X64/Debian/libsenseEIV.a(s4wf.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /senselockAPI/Linux_X64/Debian/libsenseEIV.a(sense4.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /senselockAPI/Linux_X64/Debian/libsenseEIV.a(itoken.o): relocation R_X86_64_32S against symbol `g_device_info' can not be used when making a shared object; recompile with -fPIC
由于该库是由第三方编译的,因此我无法使用PIC选项对其进行重新编译。我正在编译并链接以创建一个独立的应用程序(不是库)。
是否可以在不依赖库供应商进行更改的情况下,在Debian下编译我的应用程序? (他们反应不太快)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。