为什么这个构建错误?

时间:2013-12-31 10:54:57

标签: c++ gcc windows-8.1

我尝试使用cygwin在Win 8.1上构建hydra但是在运行make时出现此构建错误:

   -DHAVE_MATH_H
hydra-pop3.o:hydra-pop3.c:(.text+0x697): undefined reference to `MD5_Init'
hydra-pop3.o:hydra-pop3.c:(.text+0x697): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `MD5_Init'
hydra-pop3.o:hydra-pop3.c:(.text+0x6f2): undefined reference to `MD5_Update'
hydra-pop3.o:hydra-pop3.c:(.text+0x6f2): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `MD5_Update'
hydra-pop3.o:hydra-pop3.c:(.text+0x70d): undefined reference to `MD5_Update'
hydra-pop3.o:hydra-pop3.c:(.text+0x70d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `MD5_Update'
hydra-pop3.o:hydra-pop3.c:(.text+0x71e): undefined reference to `MD5_Final'
hydra-pop3.o:hydra-pop3.c:(.text+0x71e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `MD5_Final'
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld: hydra-pop3.o: bad reloc address 0x0 in section `.pdata'
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:51: recipe for target 'hydra' failed
make: *** [hydra] Error 1

可以做些什么?我可以毫无错误地运行./configure,但是它运行make失败了。

1 个答案:

答案 0 :(得分:1)

检查LIB_PATH,需要包含lib文件导出的“MD5_Init”功能。