Windows下编译openssl

为了编译poco的依赖库openssl,从openssl的官网上下载了源码openssl-1.0.2r.tar.gz

解压后,根目录下有个INSTALL.W32

这是编译的说明,照着里面的说明可以编译成功。


 If you want to compile in the assembly language routines with Visual
 C++, then you will need already mentioned Netwide Assembler binary,
 nasmw.exe or nasm.exe, to be available on your %PATH%.

 Firstly you should run Configure with platform VC-WIN32:

 > perl Configure VC-WIN32 --prefix=c:\some\openssl\dir

 Where the prefix argument specifies where OpenSSL will be installed to.

 Next you need to build the Makefiles and optionally the assembly
 language files:

 - If you are using NASM then run:

   > ms\do_nasm

 - If you don't want to use the assembly language files at all then run:

   > perl Configure VC-WIN32 no-asm --prefix=c:/some/openssl/dir
   > ms\do_ms

 If you get errors about things not having numbers assigned then check the
 troubleshooting section: you probably won't be able to compile it as it
 stands.

 Then from the VC++ environment at a prompt do:

 > nmake -f ms\ntdll.mak

 If all is well it should compile and you will have some DLLs and
 executables in out32dll. If you want to try the tests then do:
 
 > nmake -f ms\ntdll.mak test


 To install OpenSSL to the specified location do:

 > nmake -f ms\ntdll.mak install


我是按照这里面的英文一步步操作,结果编译成功。其他的版本没试,应该是一样的ok。

编译前要安装perl,我安装的是ActivePerl-5.20.2MSWin32.msi,这个网上可以下载到。

执行nmake的时候一定要运行一下vcvarsall.bat,这个文件在C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC下面,具体位置看安装的路径而定。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值