Windows compilation OpenSSL

Source: Internet
Author: User

Installation Instructions OpenSSL under source code directory INSTALL. W32

Step1

Environment construction

installation perl,visual Studio

Download Openssl Latest version of source code . I'm under the version number for openssl-1.0.0g.

Step2

Start Visual Studio Command Prompt

Execution Bin\vcvars32 Set Environment Variables

Attention:

If you encounter feedback " there should be no /microsoft ", error in the exam 1.

Step3

VS Command Line Form CD to OpenSSL Source code Directory

Run the following command

$perlconfigure Vc-win32

Result feedback configured for Vc-win32.

Attention:

Suppose you want to debug. Generate Debug version number run the following command

$perlconfigure Debug-vc-win32

Step4

Ms\do_ms.bat

Ms generated under directory Nt.mak as well Ntdll.mak. Suppose you use a static library , is compiled Nt.mak, Suppose 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 '

error in the exam 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

error in the exam 3

Step6

Installation

$ nmake-f Ms\nt.mak Install

install to this disk partition Usr/local/ssl

Use OpenSSL

include Join $ (SSL_dir) \include

Library Join $ (SSL_dir) \ Lib

Error 1

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

How to Solve

environment variable path minus double argument

Error 2

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

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

Run directly cl, The System error dialog box pops up. Hint missing mspdb80.dll.

Solution: Join 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

How to Solve

Execution vcvars32 command environment variable settings

Or

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

Or

Cflag Join

/i$ (DIR)

References link

The#include Directive

Windows compilation OpenSSL

Related Article

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.