OpenSSL compilation in Windows

Source: Internet
Author: User

Recently, I am writing a BSAFE Interface Based on OpenSSL. For more information, see OpenSSL installation on the Internet:

Preparations:
1 install vc6.0

2 download ActivePerl-5.8.0.806-MSWin32-x86 and install

3 download OpenSSL (http://www.openssl.org/source/) and unzip it to the directory.
Start installation: see install for Win32 in the OpenSSL directory.

1)> Perl configure VC-WIN32
: If the call fails, an obvious prompt is displayed.

// Generate the compilation script
// If you do not need to compile the CE version, comment out lines 4 and 5 of MS/do_ms.bat, as shown below
Rem Perl util/mk1mf. PL No-ASM VC-CE> MS/CE. Mak
Rem Perl util/mk1mf. pl DLL no-ASM VC-CE> MS/cedll. Mak
2)> MS/do_ms
: This method is recommended. This method is used for the first successful compilation.
: If you use the other two methods, you must ensure that the local machine has a compiler to use.
:> MS/do_masm (default VC built-in compiler; you can also download and install)
: MS/do_nasm (need to download by yourself)

3) Go to the C:/program files/Microsoft Visual Studio/vc98/bin directory (default installation time ).
Run vcvars32.bat to configure environment variables.

4) Jump to the OpenSSL directory
Run> nmake-f ms/NTDLL. Mak
: If the compilation is successful, the final output is under the out32dll directory, including the executable file, two DLL files, and two lib files.

 
2. debug version installation

// Same as above
(1) perl configure VC-WIN32 -- prefix = "D: // program files // OpenSSL"
// Generate the compilation script, and first modify line 2-3 of MS/do_ms.bat as follows: add "debug" before the Platform
Perl util/mk1mf. PL No-ASM debug VC-WIN32> MS/NT. Mak
Perl util/mk1mf. pl DLL no-ASM debug VC-WIN32> MS/NTDLL. Mak

2) MS/do_ms
// Compile. The/Zi parameter must be added to the cflag (row 19th) of NTDLL. Mak (generated in the previous step,
// Otherwise, you cannot step into OpenSSL source code.
Cflag =/MDD/OD/Zi-ddebug-d_debug

3) Go to the C:/program files/Microsoft Visual Studio/vc98/bin directory (default installation time ).
Run vcvars32.bat to configure environment variables.

4) Jump to the OpenSSL directory
Run> nmake-f ms/NTDLL. Mak
: If the compilation is successful, the final output is under the out32dll directory, including the executable file, two DLL files, and two lib files.

// Test
5) nmake-f ms/NTDLL. Mak Test

// Install
6) nmake-f ms/NTDLL. Mak install

(Compiling environment Windows XP, VC ++ 6.0 SP6, openssl-0.9.8e)

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.