在 windows 上编译 OpenSSL MinGw - make[1]: *** [Makefile:2800: crypto/dso/dso_win32.o] 错误 1

Compile OpenSSL MinGw on windows - make[1]: *** [Makefile:2800: crypto/dso/dso_win32.o] Error 1

我正在尝试在 windows 上使用 MinGw 32 位构建 OpenSSL,因此 我按照要求安装了 mingw 和 MSYS,然后我在 MSYS 上安装了 Perl,我从官方网站下载了 OpenSSL-1.1.1,我用

解压到 C:/openssl

-tar xf

然后,在 MSYS 中,我做了:

-perl Configure mingw shared --prefix=/c/openssl

-make depend

-make

此时,它给了我 tons of errors:

make[1]: *** [Makefile:2772: crypto/dso/dso_win32.o] Error 1
make[1]: Leaving directory '/c/openssl'
make: *** [Makefile:171: all] Error 2

我在 Whosebug 和 google 上四处寻找答案,但找不到关于我的问题的任何答案。我做错了什么 ?如有任何帮助,我们将不胜感激。

我终于找到了答案,因为 MSYS2 的导出路径,我使用了错误的 gcc(不是 mingw)。

我做到了

which gcc

它给了我错误的路径

export PATH="/path to msys/msys2/mingw32/bin:$PATH"

成功了。

如果有人遇到同样的问题,希望这对您有所帮助。