VC environment to compile OpenSSL (just an example, there are many related articles on the internet)

Source: Internet
Author: User

VC Environment OpenSSL installation and programming process

SSL is secure Sockets Layer and is a secured socket protocol, please refer to the link for details.

Some MAK files need to be generated during configuration, which are generated in Perl scripts, so install a ActivePerl

activeperl:http://www.activestate.com/activeperl/

openss:http://www.openssl.org/(this article uses OPENSSL-1.0.0-BETA5)

Refer to the INSTALL.WIN32 instructions under the OpenSSL directory for installation:

1, enter the decompression directory.

>CD c:/Openssl-1.0.0-beta5

2, running Configure.

>perl Configure Vc-win32

If unsuccessful, there will be obvious hints.

3. Create a Makefile file.

>ms/do_ms

It is recommended to use this method, and the other two methods must be used to ensure that the machine has a compiler to use.

: Ms/do_masm (Default VC comes with the compiler; also download and install it yourself)

: ms/do_nasm (download required)

4, configure the VC environment variable.

>CD C:/Program Files/microsoft Visual studio/vc98/bin

>vcvars32.bat

5, compile the dynamic link library.

>CD c:/openssl-0.9.8k

>nmake-f Ms/ntdll.mak

If the compilation succeeds, the final output is in the Out32dll directory: executable files, two DLLs (Ssleay32.lib, Libeay32.lib), and two lib files (Ssleay32.dll, Libeay32.dll).

6. Add header file and static link library path for VC.

Toolsàoptionsàdirectores, add the C:/OPENSSL-0.9.8K/INC32 directory to the Include files, and add C:/openssl-0.9.8k/out32dl to Libray files L

7, write the OpenSSL program, can refer to C:/openssl-0.9.8k/demos

(1) include the corresponding header file

#include <openssl/***. H >

(2) Add a static link library

#pragma comment (lib, "Libeay32.lib")

#pragma comment (lib, "Ssleay32.lib")

or Projectàsettingsàlinkàobject/library modules fill out libeay32.lib ssleay32.lib.

(3) Copy the dynamic link library Ssleay32.dll, libeay32.dll to the C:/windows/system32 or Debug directory, and ensure that the dynamic link library is in the correct path.

http://blog.csdn.net/harbinzju/article/details/6132229

VC environment to compile OpenSSL (just an example, there are many related articles on the internet)

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.