一、编译OpenSSL

在编译OpenSSL前,需要正确安装Perl,因为在编译OpenSSL时需要使用到该程序

下载最新版本的Perl:http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.8.822-MSWin32-x86-280952.zip。然后安装之。

下载最新版本的OpenSSL:http://www.openssl.org/source/openssl-0.9.8g.tar.gz

然后将源码释放的c:\openssl-0.9.8g目录中。

首先将VS2008的nmake的环境变量加入的cmd中:

在cmd中执行 *:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat


进入openssl源码目录。
cd c:\openssl-0.9.8.g

运行configure:
perl Configure VC-WIN32 --prefix=c:/openssl

创建Makefile文件:
ms\do_ms

编译动态库:
nmake -f ms\ntdll.mak
编译静态库:
nmake -f ms\nt.mak

测试动态库:
nmake -f ms\ntdll.mak test
测试静态库:
nmake -f ms\nt.mak test

安装动态库:
nmake -f ms\ntdll.mak install
安装静态库:
nmake -f ms\nt.mak install

清除上次动态库的编译,以便重新编译:
nmake -f ms\ntdll.mak clean
清除上次静态库的编译,以便重新编译:
nmake -f ms\nt.mak clean

posted on 2013-01-08 15:37  云 溪  阅读(3319)  评论(0编辑  收藏  举报