Compile failure for Boost SSL

2019-06-24 03:02发布

问题:

i want to use

#include <boost/asio/ssl.hpp>

but it ever drops me this:

1>d:\boost\boost\asio\ssl\detail\openssl_types.hpp(19) : fatal error C1083: Cannot open include file: 'openssl/conf.h': No such file or directory

whats wrong with it?

回答1:

boost::asio::ssl requires OpenSSL.

http://www.boost.org/doc/libs/1_50_0/doc/html/boost_asio/overview/ssl.html

OpenSSL is required to make use of Boost.Asio's SSL support.

Check configuration of boost::asio library and configuration of openssl.



回答2:

You also need to install OpenSSL http://www.openssl.org/source/



回答3:

You need OpenSSl.

Follow this link : https://slproweb.com/products/Win32OpenSSL.html

You have a list of automatic intaller for Openssl on Windows !!

Choose "Win32 OpenSSL v1.0.2d". Install it to your system and add the needed path to the lib to your project configuration.

Re-compile everything and it will work.

(Paths to add are : XXXX/OpenSSL-Win32\include and XXXX/OpenSSL-Win32\lib)



标签: c++ boost ssl