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)