我从BoostPro下载了Boost版本1.51。安装程序似乎有点不稳定,但我想我设法下载了大部分1.51文件。对于丢失的文件,我找到了另一个link,并设法下载其余的文件。我还下载了OpenSSL版本的64位64版本。我正在尝试从此example client code构建代码。链接器生成51个未解决的外部错误。这是前20个,似乎至少有些类似于其他人抱怨的错误:
1>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.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>TestBoostASIO.obj : error LNK2019: unresolved external symbol _SSL_CTX_set_verify referenced in function "public: class boost::system::error_code __thiscall boost::asio::ssl::context::set_verify_mode(int,class boost::system::error_code &)" (?set_verify_mode@context@ssl@asio@boost@@QAE?AVerror_code@system@4@HAAV564@@Z)
1>TestBoostASIO.obj : error LNK2019: unresolved external symbol _SSL_CTX_get_verify_callback referenced in function "public: class boost::system::error_code __thiscall boost::asio::ssl::context::set_verify_mode(int,class boost::system::error_code &)" (?set_verify_mode@context@ssl@asio@boost@@QAE?AVerror_code@system@4@HAAV564@@Z)
我在这里已经阅读了有关将Boost与OpenSSL相关联的问题的其他问题,并尝试了建议的步骤来解决问题。这包括:
即使执行了上述操作,我仍然会收到这些链接错误。我也尝试使用__stdcall而不是默认的__cdecl来构建我的项目 - 这会在调用信号时产生编译错误,这会产生__cdecl;所以我不认为就是这样。我已经尝试了我能想到的一切。有没有人有任何想法我做错了什么或我可以尝试什么来解决这个问题?
答案 0 :(得分:1)
我终于通过构建Boost ASIO和OpenSSL库的32位版本来构建解决方案。我现在怀疑这是Windows 64位版本的Boost :: ASIO中的一个错误,并提交了bug report。
为了摆脱未解决的链接错误,还需要下载32位版本的VS2008 redistributables以及32位版本的OpenSSL,并针对32位版本的Boost构建。