vs2012 x64兼容模式命令提示工具
1.下载openssl-1.0.1k.tar.gz的版本
openssl-1.0.1k.tar.gz分享链接:http://pan.baidu.com/s/1dDjaRCX
2.下载Activeperl,根据自己的计算机系统版本选择Activeperl版本。
ActivePerl-5.20.1.2000-MSWin32-x64-298557.msi分享链接:http://pan.baidu.com/s/1o60tzse
ActivePerl-5.20.1.2000-MSWin32-x86-64int-298557.msi分享链接:http://pan.baidu.com/s/1i3qunWx
3.安装ActivePerl。
4.解压openssl-1.0.1k.tar.gz。
5.打开vs2012 x64兼容模式命令提示工具,进入到解压后的openssl-1.0.1k目录。
6.执行以下命令:
openssl-1.0.1k>perl Configure VC-WIN64A
openssl-1.0.1k>ms\do_win64a
openssl-1.0.1k>nmake -f ms\ntdll.mak
最后生成的dll、lib都在out32dll文件目录中
vs2012 x86本机命令提示工具
1.执行上面步骤1、2、3、4
2.打开vs2012 x86本机命令提示工具,进入到解压后的openssl-1.0.1k目录。
3.执行以下命令:
openssl-1.0.1k>perl Configure VC-WIN32
openssl-1.0.1k>ms\do_ms.bat
openssl-1.0.1k>nmake -f ms\ntdll.mak
最后生成的dll、lib都在out32dll文件目录中
附加:
在运行“nmake -f ms\ntdll.mak”命令是,出现了三个错误
1、.crypto\cversion.c<80> : error C2065:"cflags":未申明的标识符
2、.crypto\cversion.c<80> :warning C4047:"return","const char * "与“int”的间接级不同
3、NMAKE:fatalerror U1077:""D:\Program Files\Microsoft Uisual Studio 11.0\VC\BIN\c1.EXE ":返回代码“0x2” stop.
解决方法:
1.openssl-1.0.1k\crypto目录;
2.打开cversion.c文件;
3.修改如下:
if (t == SSLEAY_CFLAGS)
{
#ifdef CFLAGS
return(CFLAGS);//return(cflags);
#else
return("compiler: information not available");
#endif
}