Project

General

Profile

Error using Http Client with OpenSSL

Added by Long Nguyễn Đức over 10 years ago

Today, I recompiled Wt with additional OpenSSL and Zlib. However, when I built my project using Http Client, I got the following SSL related error

1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _sk_num referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _sk_value referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _CRYPTO_cleanup_all_ex_data referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _CRYPTO_num_locks referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _CRYPTO_set_locking_callback referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _CRYPTO_set_id_callback referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _BIO_ctrl_pending referenced in function "private: enum boost::asio::ssl::detail::engine::want __thiscall boost::asio::ssl::detail::engine::perform(int (__thiscall boost::asio::ssl::detail::engine::*)(void *,unsigned int),void *,unsigned int,class boost::system::error_code &,unsigned int *)" (?perform`engine@detail@ssl@asio@boost@@AAE?AW4want@12345@P812345@AEHPAXI@Z0IAAVerror_code@system@5@PAI`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _BIO_free referenced in function "public: __thiscall boost::asio::ssl::detail::engine::~engine(void)" (??1engine`detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _BIO_read referenced in function "public: class boost::asio::mutable_buffers_1 __thiscall boost::asio::ssl::detail::engine::get_output(class boost::asio::mutable_buffer const &)" (?get_output`engine@detail@ssl@asio@boost@@QAE?AVmutable_buffers_1@45@ABVmutable_buffer@45@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _BIO_write referenced in function "public: class boost::asio::const_buffer __thiscall boost::asio::ssl::detail::engine::put_input(class boost::asio::const_buffer const &)" (?put_input`engine@detail@ssl@asio@boost@@QAE?AVconst_buffer@45@ABV645@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _BIO_ctrl referenced in function "public: class boost::system::error_code const & __thiscall boost::asio::ssl::detail::engine::map_error_code(class boost::system::error_code &)const " (?map_error_code`engine@detail@ssl@asio@boost@@QBEABVerror_code@system@5@AAV675@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _BIO_new_bio_pair referenced in function "public: __thiscall boost::asio::ssl::detail::engine::engine(struct ssl_ctx_st *)" (??0engine`detail@ssl@asio@boost@@QAE@PAUssl_ctx_st@@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _CONF_modules_unload referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _OPENSSL_add_all_algorithms_noconf referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _EVP_cleanup referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _X509_STORE_CTX_get_ex_data referenced in function "private: static int __cdecl boost::asio::ssl::detail::engine::verify_callback_function(int,struct x509_store_ctx_st *)" (?verify_callback_function`engine@detail@ssl@asio@boost@@CAHHPAUx509_store_ctx_st@@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _X509_STORE_CTX_get_error_depth referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _X509_STORE_CTX_get_current_cert referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _X509_get_subject_name referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _X509_NAME_get_index_by_NID referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _X509_NAME_get_entry referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _X509_NAME_ENTRY_get_data referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _X509_get_ext_d2i referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_CTX_new referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_CTX_free referenced in function "public: __thiscall boost::asio::ssl::context::~context(void)" (??1context`ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_set_bio referenced in function "public: __thiscall boost::asio::ssl::detail::engine::engine(struct ssl_ctx_st *)" (??0engine`detail@ssl@asio@boost@@QAE@PAUssl_ctx_st@@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_get_verify_mode referenced in function "public: class boost::system::error_code __thiscall boost::asio::ssl::detail::engine::set_verify_callback(class boost::asio::ssl::detail::verify_callback_base *,class boost::system::error_code &)" (?set_verify_callback`engine@detail@ssl@asio@boost@@QAE?AVerror_code@system@5@PAVverify_callback_base@2345@AAV675@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_get_verify_callback referenced in function "public: class boost::system::error_code __thiscall boost::asio::ssl::detail::engine::set_verify_mode(int,class boost::system::error_code &)" (?set_verify_mode`engine@detail@ssl@asio@boost@@QAE?AVerror_code@system@5@HAAV675@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_set_verify referenced in function "public: class boost::system::error_code __thiscall boost::asio::ssl::detail::engine::set_verify_callback(class boost::asio::ssl::detail::verify_callback_base *,class boost::system::error_code &)" (?set_verify_callback`engine@detail@ssl@asio@boost@@QAE?AVerror_code@system@5@PAVverify_callback_base@2345@AAV675@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_load_error_strings referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_new referenced in function "public: __thiscall boost::asio::ssl::detail::engine::engine(struct ssl_ctx_st *)" (??0engine`detail@ssl@asio@boost@@QAE@PAUssl_ctx_st@@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_free referenced in function "public: __thiscall boost::asio::ssl::detail::engine::~engine(void)" (??1engine`detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_accept referenced in function "private: int __thiscall boost::asio::ssl::detail::engine::do_accept(void *,unsigned int)" (?do_accept`engine@detail@ssl@asio@boost@@AAEHPAXI`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_connect referenced in function "private: int __thiscall boost::asio::ssl::detail::engine::do_connect(void *,unsigned int)" (?do_connect`engine@detail@ssl@asio@boost@@AAEHPAXI`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_read referenced in function "private: int __thiscall boost::asio::ssl::detail::engine::do_read(void *,unsigned int)" (?do_read`engine@detail@ssl@asio@boost@@AAEHPAXI`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_write referenced in function "private: int __thiscall boost::asio::ssl::detail::engine::do_write(void *,unsigned int)" (?do_write`engine@detail@ssl@asio@boost@@AAEHPAXI`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_ctrl referenced in function "public: __thiscall boost::asio::ssl::detail::engine::engine(struct ssl_ctx_st *)" (??0engine`detail@ssl@asio@boost@@QAE@PAUssl_ctx_st@@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_CTX_ctrl referenced in function "public: class boost::system::error_code __thiscall boost::asio::ssl::context::set_options(long,class boost::system::error_code &)" (?set_options`context@ssl@asio@boost@@QAE?AVerror_code@system@4@JAAV564@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_get_error referenced in function "private: enum boost::asio::ssl::detail::engine::want __thiscall boost::asio::ssl::detail::engine::perform(int (__thiscall boost::asio::ssl::detail::engine::*)(void *,unsigned int),void *,unsigned int,class boost::system::error_code &,unsigned int *)" (?perform`engine@detail@ssl@asio@boost@@AAE?AW4want@12345@P812345@AEHPAXI@Z0IAAVerror_code@system@5@PAI`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv2_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv2_server_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv2_client_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv3_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv3_server_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv3_client_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv23_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv23_server_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSLv23_client_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_server_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_client_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_1_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_1_server_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_1_client_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_2_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_2_server_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _TLSv1_2_client_method referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_library_init referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_get_shutdown referenced in function "public: class boost::system::error_code const & __thiscall boost::asio::ssl::detail::engine::map_error_code(class boost::system::error_code &)const " (?map_error_code`engine@detail@ssl@asio@boost@@QBEABVerror_code@system@5@AAV675@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_CTX_set_default_verify_paths referenced in function "public: class boost::system::error_code __thiscall boost::asio::ssl::context::set_default_verify_paths(class boost::system::error_code &)" (?set_default_verify_paths`context@ssl@asio@boost@@QAE?AVerror_code@system@4@AAV564@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_CTX_load_verify_locations referenced in function "public: class boost::system::error_code __thiscall boost::asio::ssl::context::add_verify_path(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class boost::system::error_code &)" (?add_verify_path`context@ssl@asio@boost@@QAE?AVerror_code@system@4@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAV564@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_set_ex_data referenced in function "public: __thiscall boost::asio::ssl::detail::engine::~engine(void)" (??1engine`detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_get_ex_data referenced in function "public: __thiscall boost::asio::ssl::detail::engine::~engine(void)" (??1engine`detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_CTX_set_ex_data referenced in function "public: __thiscall boost::asio::ssl::context::~context(void)" (??1context`ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_CTX_get_ex_data referenced in function "public: __thiscall boost::asio::ssl::context::~context(void)" (??1context`ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _SSL_get_ex_data_X509_STORE_CTX_idx referenced in function "private: static int __cdecl boost::asio::ssl::detail::engine::verify_callback_function(int,struct x509_store_ctx_st *)" (?verify_callback_function`engine@detail@ssl@asio@boost@@CAHHPAUx509_store_ctx_st@@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _ERR_get_error referenced in function "public: __thiscall boost::asio::ssl::context::context(enum boost::asio::ssl::context_base::method)" (??0context`ssl@asio@boost@@QAE@W4method@context_base@123@`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _ERR_reason_error_string referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall boost::asio::error::detail::ssl_category::message(int)const " (?message`ssl_category@detail@error@asio@boost@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H`Z)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _ERR_free_strings referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _ERR_remove_state referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _ENGINE_cleanup referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init`openssl_init_base@detail@ssl@asio@boost@@QAE`XZ)
1>wtd.lib(Client.obj) : error LNK2019: unresolved external symbol _GENERAL_NAMES_free referenced in function "public: bool __thiscall boost::asio::ssl::rfc2818_verification::operator()(bool,class boost::asio::ssl::verify_context &)const " (??Rrfc2818_verification`ssl@asio@boost@@QBE_N_NAAVverify_context@123@`Z)

Did I miss anything?


Replies (2)

RE: Error using Http Client with OpenSSL - Added by Wim Dumon over 10 years ago

Hello,

That looks like the OpenGL libraries were not added to the link command.

Do you get this error while compiling Wt and its examples, or in your own project? In case of the former, can you try again from a clean build directory, and in the case of the latter, did you add libeay32 and libssl32 to the list of libraries to link to?

BR,

Wim.

RE: Error using Http Client with OpenSSL - Added by Long Nguyễn Đức over 10 years ago

I figured out that I didn't add libeay32 and ssleay32 to the linker. Problem solved.

Cheer.

    (1-2/2)