为了编译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下面,具体位置看安装的路径而定。