第一步,分别下载32和64位的Openssl,然后安装,lib安装到系统目录下,下载地址
第二步,到github上下载Poco库的zip压缩包,下载地址
第三步,分别编译win32和x64版Poco库
(1)编译win32版poco库:
1.在poco-devel/buildwin.cmd中添加如下内容:
set OPENSSL_DIR=C:\Program Files\OpenSSL-Win32
set OPENSSL_INCLUDE=%OPENSSL_DIR%\include
set OPENSSL_LIB=%OPENSSL_DIR%\lib;%OPENSSL_DIR%\lib\VC;%OPENSSL_DIR%\lib\VC\static
set INCLUDE=%INCLUDE%;%OPENSSL_INCLUDE%
set LIB=%LIB%;%OPENSSL_LIB%
2.删除 poco-devel/components中如下两行(如果装了它们可以不删)
3.开始->Visual Studio 2019->x86 Native Tools Command Prompt for VS 2019,进入poco-devel目录,运行:buildwin 160 build all both win32 samples
(2)编译x64版poco库:
1.在poco-devel/buildwin.cmd中添加如下内容:
set OPENSSL_DIR=C:\Program Files\OpenSSL-Win64
set OPENSSL_INCLUDE=%OPENSSL_DIR%\include
set OPENSSL_LIB=%OPENSSL_DIR%\lib;%OPENSSL_DIR%\lib\VC;%OPENSSL_DIR%\lib\VC\static
set INCLUDE=%INCLUDE%;%OPENSSL_INCLUDE%
set LIB=%LIB%;%OPENSSL_LIB%
2.删除 poco-devel/components中如下两行(如果装了它们可以不删)
3.开始->Visual Studio 2019->x64 Native Tools Command Prompt for VS 2019,进入poco-devel目录,运行:buildwin 160 build all both x64 samples
4.如果运行时出现CppUnit_vs160.vcxproj模块计算机类型“X86”与目标计算机类型“X64”冲突,只须进入到poco-devel\CppUnit目录下用vs2019打开CppUnit_vs160.vcxproj生成一次64位的即可