为 Microsoft Visual Studio 2010 编译 OpenSSL for boost asio

发布于 2024-10-09 23:33:50 字数 591 浏览 0 评论 0原文

我用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小镇女孩 2024-10-16 23:33:50

对于 VS 2008,将 C:\OpenSSL-Win32\includeC:\OpenSSL-Win32\lib 目录添加到 Visual Studio 的路径,然后添加 ssleay32. lib libeay32.lib 到项目设置中的Linker/Input/Additional Dependency 选项。我假设 VS 2010 是一样的。

For VS 2008, add the C:\OpenSSL-Win32\include and C:\OpenSSL-Win32\lib directories to Visual Studio's paths, then add ssleay32.lib libeay32.lib to the Linker/Input/Additional Dependencies option in the project's settings. I would assume that VS 2010 is the same.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文