我正在尝试编译 Donald Eastlake 的 RFC 3797 随机选择算法的实现(代码:http://kambing.ui.ac.id/minix/other/rfc3797/ http://kambing.ui.ac.id/minix/other/rfc3797/)。但是,我收到链接器错误:
rfc3797.c:(.text+0xe7f): undefined reference to `log'
我试图使用提供的 Makefile 来实现它,该文件明确链接到数学库,但我仍然收到错误:
cc -lm -o randomselection rfc3797.c MD5.c
我怎样才能编译这个程序?
我不知道原因是什么,但如果你搬家-lm
到最后,就会编译了。
$ cc -o randomselection rfc3797.c MD5.c -lm
rfc3797.c: In function ‘getinteger’:
rfc3797.c:183:3: warning: format not a string literal and no format arguments [-Wformat-security]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)