<bdo id='pDG0D'></bdo><ul id='pDG0D'></ul>
    <i id='pDG0D'><tr id='pDG0D'><dt id='pDG0D'><q id='pDG0D'><span id='pDG0D'><b id='pDG0D'><form id='pDG0D'><ins id='pDG0D'></ins><ul id='pDG0D'></ul><sub id='pDG0D'></sub></form><legend id='pDG0D'></legend><bdo id='pDG0D'><pre id='pDG0D'><center id='pDG0D'></center></pre></bdo></b><th id='pDG0D'></th></span></q></dt></tr></i><div id='pDG0D'><tfoot id='pDG0D'></tfoot><dl id='pDG0D'><fieldset id='pDG0D'></fieldset></dl></div>

      <tfoot id='pDG0D'></tfoot>

        <legend id='pDG0D'><style id='pDG0D'><dir id='pDG0D'><q id='pDG0D'></q></dir></style></legend>

        <small id='pDG0D'></small><noframes id='pDG0D'>

      1. 在 Visual Studio 2012 中使用 OpenSSL

        时间:2024-08-14

        1. <i id='Y8k4c'><tr id='Y8k4c'><dt id='Y8k4c'><q id='Y8k4c'><span id='Y8k4c'><b id='Y8k4c'><form id='Y8k4c'><ins id='Y8k4c'></ins><ul id='Y8k4c'></ul><sub id='Y8k4c'></sub></form><legend id='Y8k4c'></legend><bdo id='Y8k4c'><pre id='Y8k4c'><center id='Y8k4c'></center></pre></bdo></b><th id='Y8k4c'></th></span></q></dt></tr></i><div id='Y8k4c'><tfoot id='Y8k4c'></tfoot><dl id='Y8k4c'><fieldset id='Y8k4c'></fieldset></dl></div>

          <small id='Y8k4c'></small><noframes id='Y8k4c'>

        2. <tfoot id='Y8k4c'></tfoot>
              <legend id='Y8k4c'><style id='Y8k4c'><dir id='Y8k4c'><q id='Y8k4c'></q></dir></style></legend>

                  <tbody id='Y8k4c'></tbody>
                  <bdo id='Y8k4c'></bdo><ul id='Y8k4c'></ul>
                  本文介绍了在 Visual Studio 2012 中使用 OpenSSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我已经从 http://www.openssl.org/source/下载了最新版本的 Openssl

                  我想在 Visual Studio 2012 中使用它,尤其是获取文件的 md5/sha-1 哈希,但我无法使用 openssl 库包含/设置环境.老实说,我对要包含的内容和位置感到困惑,但我已经阅读了 README-s.

                  I would like to use it in Visual Studio 2012, especially getting the md5/sha-1 hash of a file, but I can not include / setup the environment with the openssl library. To be honest I got confused what to include, and where, however I have read the README-s.

                  我收到此错误.

                  Error   1   error LNK2019: unresolved external symbol _MD5_Init referenced in function _main
                  

                  所以我的问题是,我已经下载了最新版本(openssl-1.0.1e.tar.gz),我应该在 VS2012 中配置什么才能使用 lib?谢谢!

                  So my question is, I have downloaded the latest release (openssl-1.0.1e.tar.gz), what should I config in VS2012 to be able to use the lib? Thanks!

                  更新

                  这个问题也帮助我找到了解决方案.使用 Visual Studio 2010 和 OpenSSL 提升 SSL

                  This question helped me also in finding the solution. Boost SSL with Visual Studio 2010 and OpenSSL

                  在 VS2012 中使用 openSSL 库所需的步骤:

                  The steps required to use the openSSL lib with VS2012:

                  • 从 http://下载并安装一个版本(我有 64 位操作系统,但我安装了 32 位 openssl)/slproweb.com/products/Win32OpenSSL.html.
                  • 在VS中新建项目,然后配置属性/C/C++/General/Additional Include Directories: openssl include folder (C:OpenSSL-Win32include)
                  • 链接器/通用/附加库目录:C:OpenSSL-Win32lib
                  • 链接器/输入/附加依赖项:

                  libeay32.lib libeay32MTd.lib libeay32MT.lib libeay32MDd.liblibeay32MD.lib ssleay32.lib ssleay32MTd.lib ssleay32MT.libssleay32MDd.lib ssleay32MD.lib

                  libeay32.lib libeay32MTd.lib libeay32MT.lib libeay32MDd.lib libeay32MD.lib ssleay32.lib ssleay32MTd.lib ssleay32MT.lib ssleay32MDd.lib ssleay32MD.lib

                  (据说我只需要添加与 C/C++/代码生成/运行时库匹配的那个,但它是这样工作的.)

                  (It was written that I need to only add that one which matches with C/C++/Code Generation/Runtime Library, but It works me this way.)

                  • 将这些文件复制到当前 VS 文件夹/VC/lib 中

                  推荐答案

                  你用什么编译器来编译 OpenSSL?你用过MinGW吗?如果是这样,请确保不要剥离它们(或仅使用 --strip-unneeded),否则导入符号将被剥离.标头和 lib 版本是否匹配?

                  What compiler did you use to compile OpenSSL? Did you use MinGW? If so, make sure you don't strip them (or just with --strip-unneeded) otherwise import symbols will be stripped. Do the header and lib version match?

                  也许您想尝试以下预构建的:http://slproweb.com/products/Win32OpenSSL.html 那些肯定有效.

                  Maybe you want to try pre built ones from: http://slproweb.com/products/Win32OpenSSL.html those work for sure.

                  这篇关于在 Visual Studio 2012 中使用 OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 MinGW 编译器和 SSL 支持静态编译 Qt 下一篇:错误:在 C++ 项目中使用 HMAC_CTX 时类型不完整

                  相关文章

                • <tfoot id='0Fzf1'></tfoot>

                  1. <legend id='0Fzf1'><style id='0Fzf1'><dir id='0Fzf1'><q id='0Fzf1'></q></dir></style></legend>

                    • <bdo id='0Fzf1'></bdo><ul id='0Fzf1'></ul>
                  2. <small id='0Fzf1'></small><noframes id='0Fzf1'>

                      <i id='0Fzf1'><tr id='0Fzf1'><dt id='0Fzf1'><q id='0Fzf1'><span id='0Fzf1'><b id='0Fzf1'><form id='0Fzf1'><ins id='0Fzf1'></ins><ul id='0Fzf1'></ul><sub id='0Fzf1'></sub></form><legend id='0Fzf1'></legend><bdo id='0Fzf1'><pre id='0Fzf1'><center id='0Fzf1'></center></pre></bdo></b><th id='0Fzf1'></th></span></q></dt></tr></i><div id='0Fzf1'><tfoot id='0Fzf1'></tfoot><dl id='0Fzf1'><fieldset id='0Fzf1'></fieldset></dl></div>