Reputation: 3
At the moment, I failed to build cpp-netlib-0.9.4 with boost_1_60_0 and openssl already installed. Would you please give me an advice on how to resolve this error? The following is the log I've got when the error occurred. For your information, the include path and library path are set to the proper directories.
1>------ Build started: Project: cppnetlib-client-connections, Configuration: Debug Win32 ------
1> Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cl /c /I"C:\codes\openssl-master\include\openssl" /I"C:\codes\openssl-master\include" /I"C:\codes\c++\cpp-netlib-0.9.4" /IC:\codes\c++\boost_1_60_0 /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D BOOST_NETWORK_DEBUG /D BOOST_NETWORK_ENABLE_HTTPS /D _SCL_SECURE_NO_WARNINGS /D _WIN32_WINNT=0x0501 /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cppnetlib-client-connections.dir\Debug\\" /Fd"cppnetlib-client-connections.dir\Debug\cppnetlib-client-connections.pdb" /Gd /TP /analyze- /errorReport:prompt "C:\codes\c++\cpp-netlib-0.9.4\libs\network\src\client.cpp"
1>
1> client.cpp
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/openssl_init.ipp(47): error C2039: 'CRYPTO_set_id_callback': is not a member of '`global namespace''
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/openssl_init.ipp(47): error C3861: 'CRYPTO_set_id_callback': identifier not found
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/openssl_init.ipp(64): error C2039: 'CRYPTO_set_id_callback': is not a member of '`global namespace''
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/openssl_init.ipp(64): error C3861: 'CRYPTO_set_id_callback': identifier not found
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(58): error C2039: 'RSA_free': is not a member of '`global namespace''
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(58): error C3861: 'RSA_free': identifier not found
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(64): error C2039: 'DH_free': is not a member of '`global namespace''
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(64): error C3861: 'DH_free': identifier not found
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(83): error C2039: 'SSLv2_method': is not a member of '`global namespace''
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(83): error C3861: 'SSLv2_method': identifier not found
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(86): error C2039: 'SSLv2_client_method': is not a member of '`global namespace''
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(86): error C3861: 'SSLv2_client_method': identifier not found
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(89): error C2039: 'SSLv2_server_method': is not a member of '`global namespace''
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(89): error C3861: 'SSLv2_server_method': identifier not found
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(208): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(208): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(212): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(212): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(214): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(214): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(551): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(551): error C2227: left of '->default_passwd_callback' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(552): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(552): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(552): error C2660: 'PEM_read_bio_X509_AUX': function does not take 2 arguments
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(580): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(580): error C2227: left of '->default_passwd_callback' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(581): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(581): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(581): error C2660: 'PEM_read_bio_X509': function does not take 2 arguments
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(657): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(657): error C2227: left of '->default_passwd_callback' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(658): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(658): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(658): error C2660: 'PEM_read_bio_PrivateKey': function does not take 2 arguments
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(716): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(716): error C2227: left of '->default_passwd_callback' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(717): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(717): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(717): error C2660: 'PEM_read_bio_RSAPrivateKey': function does not take 2 arguments
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(936): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(936): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(938): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(938): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(940): error C2027: use of undefined type 'ssl_ctx_st'
1> C:\codes\openssl-master\include\openssl/ossl_typ.h(181): note: see declaration of 'ssl_ctx_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/impl/context.ipp(940): error C2227: left of '->default_passwd_callback_userdata' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/engine.ipp(207): error C2065: 'SSL_R_SHORT_READ': undeclared identifier
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/engine.ipp(208): error C2440: '<function-style-cast>': cannot convert from 'const boost::system::error_category' to 'boost::system::error_code'
1> C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/engine.ipp(208): note: No constructor could take the source type, or constructor overload resolution was ambiguous
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/engine.ipp(214): error C2027: use of undefined type 'ssl_st'
1> C:\codes\openssl-master\include\openssl/ssl.h(320): note: see declaration of 'ssl_st'
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/engine.ipp(214): error C2227: left of '->version' must point to class/struct/union/generic type
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/engine.ipp(221): error C2065: 'SSL_R_SHORT_READ': undeclared identifier
1>C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/engine.ipp(222): error C2440: '<function-style-cast>': cannot convert from 'const boost::system::error_category' to 'boost::system::error_code'
1> C:\codes\c++\boost_1_60_0\boost/asio/ssl/detail/impl/engine.ipp(222): note: No constructor could take the source type, or constructor overload resolution was ambiguous
Upvotes: 0
Views: 489
Reputation: 26
I have some same problem with you and may be this answer can help you
With bug "CRYPTO_set_id_callback", "RSA_free" and "DH_free" because these functions with define OPENSSL_USE_DEPRECATD. You need call function like that: ( edit in boost/asio/ssl/detail/impl/openssl_init.ipp )
#ifdef OPENSSL_USE_DEPRECATD
::CRYPTO_set_id_callback(0);
#endif
Same with RSA_free and DH_free:
#ifdef OPENSSL_USE_DEPRECATED
if(p)
::RSA_free(p)
#endif
Upvotes: 1