c++ - 为什么这个构建错误?

标签 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 失败了。

最佳答案

检查 LIB_PATH,您需要包含导出“MD5_Init”函数的 lib 文件。

关于c++ - 为什么这个构建错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20856193/

相关文章:

c++ - 这个代码片段有什么作用?

c++ - 根据类模板的类型名生成字符串?

c - ';' token 之前的错误 : expected ',' , ')' 或 '&'

c - 确保编译器始终使用 SSE sqrt 指令

c# - 非 mvc 应用程序要求 WebPages.Razor 程序集

c++ - 在 Windows 8 上使 Windows 光标变大

c++ - C++ 库之间的一致性头文件名

c++ - 为什么在我的 Mac 上编译的 C++ 库不能在服务器上运行?

c++ - Windows 8.1 上的 D3D11_CREATE_DEVICE_DEBUG

c++ - 让 explorer.exe 从启动时加载我的扩展