"undefined reference to strerror_r" 使用 OpenSSL-1.1.0e 和 MinGW

"undefined reference to strerror_r" with OpenSSL-1.1.0e and MinGW

构建 OpenSSL-1.1.0d 时出现以下错误。

./libcrypto.a(o_str.o):o_str.c:(.text+0x5cb): undefined reference to `strerror_r'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile.shared:187: link_app.] Error 1
make[2]: Leaving directory '/c/MinGW/openssl-1.1.0d'
make[1]: *** [Makefile:5966: apps/openssl.exe] Error 2
make[1]: Leaving directory '/c/MinGW/openssl-1.1.0d'
make: *** [Makefile:128: all] Error 2

我按照以下步骤构建它

  1. tar -xf vv.tar.gz

  2. perl Configure mingw no-shared

  3. make

说明来自Compiling OpenSSL on Windows (mingw32)

为什么 link 失败了,我该如何解决?

strerror_r mingw可能没有实现,需要查看minwg最新文档