Windows compilation OpenSSL

Source: Internet
Author: User

Installation Instructions Reference OpenSSL under the source folder INSTALL. W32

Step1

Environment construction

installation perl,visual Studio

Download Openssl The latest version of the source . I'm under the version for openssl-1.0.0g.

Step2

Start Visual Studio Command Prompt

Run Bin\vcvars32 Set Environment Variables

Attention:

If you encounter feedback " there should be no /microsoft ", Reference Error 1.

Step3

VS command-line window CD to OpenSSL source Folder

Execute the following command

$perlconfigure Vc-win32

Result feedback configured for Vc-win32.

Attention:

If you want to debug, build Debug version executes the following command

$perlconfigure Debug-vc-win32

Step4

Ms\do_ms.bat

Ms folder under Build Nt.mak as well Ntdll.mak. If you use a static library , is compiled Nt.mak, If you use a dynamic library , is compiled Ntdll.mak

in Nt.mak as an example

Step5

Compile

$ nmake-f Ms\nt.mak

Attention:

Clear compilation

$ nmake-f Ms\nt.mak Clean

Test Library

$ nmake-f Ms\nt.mak Test

In the event of an error:

Nmake:fatal errorU1077: ' C:\Program Files (x86) \microsoft Visual Studio 9.0\

Vc\bin\cl. EXE "': Return code ' 0xc0000135 '

Reference Error 2

If you encounter an error similar to the inability to open a file:

D:\openssl-1.0.1g\crypto\cryptlib.h (+): Fatal error C1083:cannot open include

File: ' stdlib.h ': No such file or directory

Reference Error 3

Step6

Installation

$ nmake-f Ms\nt.mak Install

install to this disk partition Usr/local/ssl

Use OpenSSL

include Add $ (SSL_dir) \include

Library Add $ (SSL_dir) \ Lib

Error 1

Run Vcvars32.bat , you should not be prompted here /microsoft , causing the environment variable configuration to fail.

Solution Solutions

environment variable path minus double quotes

Error 2

Nmake:fatal errorU1077: ' C:\Program Files (x86) \microsoft Visual Studio 9.0\

Vc\bin\cl. EXE "': Return code ' 0xc0000135 '

Direct Execution cl, A System error dialog box appears, prompting for missing Mspdb80.dll .

Solution: Add Mspdb80.dll The path of the location.

Error 3

D:\openssl-1.0.1g\crypto\cryptlib.h (+): Fatal error C1083:cannot open include

File: ' stdlib.h ': No such file or directory

Solution Solutions

Run vcvars32 command Set environment variables

Or

$setINCLUDE =$ (DIR) ;%I Nclude%

Or

Cflag Add

/i$ (DIR)

Reference links

The#include Directive

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.