How to build OpenSSL with MinGW in Windows? [closed]

只愿长相守 提交于 2019-12-17 22:09:41

问题


I want to build OpenSSL in Windows with MinGW,
How can I do that? Please help me.
Thanks.


回答1:


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.



来源:https://stackoverflow.com/questions/9379363/how-to-build-openssl-with-mingw-in-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!