VS2013 compiling OpenSSL under Windows environment

Source: Internet
Author: User
Tags openssl version sha1

OpenSSL version: 1.0.2H

Compiler: MSVC (VS2013)

Need to prepare the tool: Perl.

Perl download for Windows environment Please poke here: Http://www.activestate.com/activeperl

Open the VS2013 x86 Native command Prompt (compiled by the 32-bit version) and switch to the SSL solution path:

Perl Configure vc-win32 --prefix=C:\build-openssl-vc-32 #rel Ease version with Vc-win32 Debug version with Debug-vc-win32

ms\do_ms.bat nmake -F MS\NT. Mak nmake -F MS\NT. Mak Install

Run the command above, resulting in an error:

ssembling: tmp32\sha1-586.asm

tmp32\sha1-586.asm(1432) : error A2070:invalid instruction operands

tmp32\sha1-586.asm(1576) : error A2070:invalid instruction operands

Then the reason traced here: https://github.com/openssl/openssl/issues/169

See after the reason is that the original Do_ms.bat compilation is used MASM compiler, MASM compile sha1-586.asm file error. Issue above someone said do not use MASM compile, replace NASM compile,

Then I downloaded the NASM from NASM's official website, with the environment variable, run the following command:

Perl Configure vc-win32 --prefix=C:\build-openssl-vc-32 #rel Ease version with Vc-win32 Debug version with Debug-vc-win32

ms\do_nasm.bat nmake -F MS\NT. Mak nmake -F MS\NT. Mak Install

Then you can build it successfully.

References

http://developer.covenanteyes.com/building-openssl-for-visual-studio/

https://github.com/openssl/openssl/issues/169

Http://stackoverflow.com/questions/12850607/initializing-big-numbers-with-constants-in-masm

VS2013 compiling OpenSSL under Windows environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.