为 Microsoft Visual Studio 2010 编译 OpenSSL for boost asio
我用bjam编译了boost,然后编译了OpenSSL。他们两个都是分开工作的。
我在 Visual Studio 10 中设置了指向我的 OpenSSL 库目录的链接。
但是,当我尝试编译示例 boost ssl asio 程序时,我收到 44 个未解决的外部链接器错误,如下所示:
1>testing.obj : error LNK2019: unresolved external symbol _SSLv23_server_method referenced in function "public: void __thiscall boost::asio::ssl ::detail::openssl_context_service::create(struct ssl_ctx_st * &,enum boost::asio::ssl::context_base::method)" (?create@openssl_context_service@detail@ssl@asio@boost@@QAEXAAPAUssl_ctx_st@@ W4method@context_base@345@@Z)
您能给我有关正确链接 OpenSSL 到 boost 的分步说明吗?太感谢了
I compiled boost with bjam, and then I compiled OpenSSL. Both of them work separately.
I set up the links in Visual Studio 10 to point to my OpenSSL library directory.
But when I attempt to compile example boost ssl asio programs I get 44 unresolved external linker errors like this one:
1>testing.obj : error LNK2019: unresolved external symbol _SSLv23_server_method referenced in function "public: void __thiscall boost::asio::ssl::detail::openssl_context_service::create(struct ssl_ctx_st * &,enum boost::asio::ssl::context_base::method)" (?create@openssl_context_service@detail@ssl@asio@boost@@QAEXAAPAUssl_ctx_st@@W4method@context_base@345@@Z)
Can you please give me step-by-step instructions on properly linking OpenSSL to boost? Thank you so much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 VS 2008,将
C:\OpenSSL-Win32\include
和C:\OpenSSL-Win32\lib
目录添加到 Visual Studio 的路径,然后添加ssleay32. lib
libeay32.lib
到项目设置中的Linker/Input/Additional Dependency
选项。我假设 VS 2010 是一样的。For VS 2008, add the
C:\OpenSSL-Win32\include
andC:\OpenSSL-Win32\lib
directories to Visual Studio's paths, then addssleay32.lib
libeay32.lib
to theLinker/Input/Additional Dependencies
option in the project's settings. I would assume that VS 2010 is the same.