< ld:未知选项:-Bsymbolic& quot;尝试在OSX上构建inpars时 [英] &quot;ld: unknown option: -Bsymbolic&quot; when trying to build iniparser on OSX
问题描述
我正在尝试在OSX上构建 http://github.com/ndevilla/iniparser ,但得到:
I'm trying to build http://github.com/ndevilla/iniparser on OSX, but getting:
~/ make
compiling src/iniparser.c ...
compiling src/dictionary.c ...
a - src/iniparser.o
a - src/dictionary.o
ld: unknown option: -Bsymbolic
collect2: ld returned 1 exit status
make: *** [libiniparser.so] Error 1
这似乎不是代码本身的已知问题.我需要在系统上进行哪些调整?
This seems to not be a known issue with the code itself. What do I need to adjust on my system?
推荐答案
该项目的 Makefile
中指定的 -Bsymbolic
标志特定于GNU链接器和平台使用ELF二进制格式.OS X都不使用. Makefile
还有其他一些与OS X工具链不兼容的标志,例如对共享库而不是 .dylib使用
,以及另一个不受支持的链接器标志( .so
扩展名 -Wl,-soname =…
).您应该能够删除不受支持的链接器标志,然后修复文件扩展名以使工作正常.
The -Bsymbolic
flag specified in the Makefile
of that project is specific to the GNU linker and platforms using the ELF binary format. OS X uses neither. The Makefile
has several other flags that aren't compatible with the OS X toolchain, such as the use of the .so
extension for shared libraries rather than .dylib
, and another unsupported linker flag (-Wl,-soname=…
). You should be able to remove the unsupported linker flags and then fix up the file extensions to make things work.
这篇关于< ld:未知选项:-Bsymbolic& quot;尝试在OSX上构建inpars时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!