【问题标题】:GNUjump not building on Arch LinuxGNUjump 不在 Arch Linux 上构建
【发布时间】:2014-10-16 00:37:16
【问题描述】:

我正在尝试在 Arch Linux(2014 年 10 月 1 日发布)上构建 GNUjump,但我遇到了一个奇怪的错误,我不知道该怎么办。

./configure 没有显示错误。所以,我启动 make,然后出现:

/usr/bin/ld: SDL_rotozoom.o: undefined reference to symbol 'sincos@@GLIBC_2.1'
/usr/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

在基于 Debian 的 PC 上,相同的 Makefile 可以工作。 当然,我错过了一些东西,但我不知道是什么。

【问题讨论】:

    标签: linux gnu archlinux


    【解决方案1】:

    您需要在编译器/链接器命令行中包含 -lm 以链接到标准数学库 math.h
    看到这个:Why do you have to link the math library in C?

    【讨论】:

    • 谢谢。但是为什么相同的 makefile 可以在 Debian 环境中工作呢?实在想不通。
    • 很难说,@AlbyV0D。它可能取决于很多东西,比如默认设置、使用的编译器和后端、makefile 本身等等。你编译成功了吗?
    • 我使用另一个发行版(始终基于 Arch)解决了问题,并在其中一个 Makefile 中工作。感谢您的帮助。
    猜你喜欢
    • 2011-12-23
    • 1970-01-01
    • 1970-01-01
    • 2015-06-15
    • 2014-10-01
    • 2015-11-04
    • 2014-02-09
    • 2014-08-02
    • 1970-01-01
    相关资源
    最近更新 更多