1.下载
https://github.com/pocoproject/poco/releases/tag/poco-1.12.0-release
https://github.com/pocoproject/poco/releases/tag/poco-1.9.4-release
如果你的openssl是1.0.*版本(openssl version -a查看),就用1.9.4。如果是1.1或者更高,就用最新版本吧。否则改来改去的挺麻烦。
2.编译
tar -zxvf ./poco-poco-1.9.4-release.tar.gz
sudo ./configure --no-tests --no-samples --omit=Data/ODBC,Data/MySQL,MongoDB,PDF --static --cflags=-fPIC --prefix=/home/ubuntu/Pictures/lib/109
make -j16
make install
3.小问题
a.
poco-poco-1.12.0-release/Crypto/src/EVPCipherImpl.cpp:87:31: error: invalid conversion from ‘const EVP_PKEY* {aka const evp_pkey_st*}’ to ‘EVP_PKEY* {aka evp_pkey_st*}’ [-fpermissive]
_blockSize = EVP_PKEY_size(_pEVP);
b.
poco-poco-1.12.0-release/Crypto/src/Envelope.cpp:27:36: error: invalid operands of types ‘int’ and ‘void’ to binary ‘operator!=’
if (1 != EVP_CIPHER_CTX_init(_pCtx))
都是版本和openssl不对应导致的。使用1.9.4就好了。或者升级openssl