问题描述
我使用升压版本1.47,Visual Studio 2010中,我下载的Windows二进制文件和链接到包含目录和lib目录从我的项目preferences。但是,我还是不能自boost :: ASIO使用任何SSL功能。
I'm using boost version 1.47, visual studio 2010, I downloaded the binaries for windows and linked to the include directory and lib directory from my project preferences. But I still can't use any ssl functionality from boost::asio.
这是我下载的二进制文件的网站:
This is the site where I downloaded the binaries: http://www.slproweb.com/products/Win32OpenSSL.html
我下载:VISUAL C ++ 2008再分发和Win32 OpenSSL的1.0.1版
这是错误消息我得到:
Error 1 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) C:\Documents and Settings\Elias\my documents\visual studio 2010\Projects\OmniTcp\OmniTcp\main.obj OmniTcp
Error 2 error LNK2001: unresolved external symbol _ERR_reason_error_string C:\Documents and Settings\Elias\my documents\visual studio 2010\Projects\OmniTcp\OmniTcp\OmniTcp.obj OmniTcp
Error 3 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) C:\Documents and Settings\Elias\my documents\visual studio 2010\Projects\OmniTcp\OmniTcp\main.obj OmniTcp
Error 4 error LNK2001: unresolved external symbol _CRYPTO_set_id_callback C:\Documents and Settings\Elias\my documents\visual studio 2010\Projects\OmniTcp\OmniTcp\OmniTcp.obj OmniTcp
Error 5 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) C:\Documents and Settings\Elias\my documents\visual studio 2010\Projects\OmniTcp\OmniTcp\main.obj OmniTcp
Error 6 error LNK2001: unresolved external symbol _CRYPTO_set_locking_callback C:\Documents and Settings\Elias\my documents\visual studio 2010\Projects\OmniTcp\OmniTcp\OmniTcp.obj OmniTcp
Error 25 error LNK1120: 12 unresolved externals C:\Documents and Settings\Elias\my documents\visual studio 2010\Projects\OmniTcp\Debug\OmniTcp.exe OmniTcp
我得到一些更多的错误信息,但嘿都是相似的海誓山盟。
I get a few more error messages but hey are all similar to eachother.
推荐答案
由于在评论中提到的问题,我的项目挂钩,一旦我说:
As mentioned in the comments to the question, my project linked once I added:
lib\libeay32.lib
lib\ssleay32.lib
要在项目 - >配置属性 - >连接器 - >输入 - >附加依赖项属性。
To the Project->Configuration Properties->Linker->Input->Additional Dependencies property.
这篇关于提高:: ASIO SSL连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!