如何在WIndows中使用MinGW构建OpenSSL? [英] How to build OpenSSL with MinGW in WIndows?
问题描述
我想在Windows中使用MinGW构建OpenSSL,
我该如何做?请帮助我。
谢谢。
写道。之后,它已转换为脚本(查看OpenSSL部分,显然)。它假定您有一个工作的MinGW安装,并且有一个工作的MSys控制台。
OpenSSL
要构建OpenSSL,您需要一个有效的 Perl安装。
从其官方网站下载OpenSSL,并解压缩存档。 / p>
Windows 32/64位 - MinGW
您必须从MSys > console。
对于32位:
perl配置mingw no-shared no-asm --prefix = / c / OpenSSL
对于64位:
perl配置mingw64 no-shared no-asm --prefix = / C / OpenSSL-x64
然后:
make depends
make
make install
make depends
如果您指定了任何 no -...
选项,则只需要最新的OpenSSL版本。
注意,这将以静态模式编译OpenSSL。
如果在某些时候你得到一个make(e = 2):错误,另一个make.exe在您的PATH或只是键入 / bin / make
而不是 make
。
当然,您可能需要使用其他选项(例如动态链接或启用asm)来编译它。因此,随时可以查看帮助 perl Configure
可以提供更多有关可用选项的信息。
I want to build OpenSSL in Windows with MinGW,
How can I do that? Please help me.
Thanks.
This is an extract from a personal how-to I wrote. It has since been transformed to a script (look at the OpenSSL section, obviously). It assumes you have a working installation of MinGW and that you have a working MSys console.
OpenSSL
To build OpenSSL, you need a working Perl installation.
Download OpenSSL from its official website and decompress the archive.
Windows 32/64 bits - MinGW
You must run these commands from a MSys console.
For 32 bits:
perl Configure mingw no-shared no-asm --prefix=/c/OpenSSL
For 64 bits:
perl Configure mingw64 no-shared no-asm --prefix=/C/OpenSSL-x64
Then:
make depend
make
make install
The make depend
line is only needed on the most recent OpenSSL version if you specified any of the no-...
options.
Note that this will compile OpenSSL in static mode.
If at some point you get a "make (e=2):" error, ensure you don't have another "make.exe" in your PATH or just type /bin/make
instead of make
.
You may, of course, need to compile it with other options (such as dynamic linking, or asm enabled). So feel free to look at the help perl Configure
can provide to know more about the available options.
这篇关于如何在WIndows中使用MinGW构建OpenSSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!