• <tfoot id='ek3De'></tfoot>
  • <legend id='ek3De'><style id='ek3De'><dir id='ek3De'><q id='ek3De'></q></dir></style></legend>

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

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

        如何在 GCC 中使用 OpenSSL?

        时间:2023-09-18
      2. <small id='ss73q'></small><noframes id='ss73q'>

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

                1. <tfoot id='ss73q'></tfoot>
                  本文介绍了如何在 GCC 中使用 OpenSSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试在 gcc 程序中使用 openssl 但它不起作用.

                  I'm trying to use openssl in a gcc program but it isn't working.

                  g++ server.cpp /usr/lib/libssl.a -o server
                  

                  给出错误消息,与 -l 选项一样.我必须在命令行上输入什么才能与 openssl 链接?文件 /usr/lib/libssl.a 存在,但我仍然收到链接器错误no such function MD5() exists.

                  gives an error message, as does anything with the -l option. What must I type on the command line to link with openssl? The file /usr/lib/libssl.a exists, but nevertheless I still get the linker error no such function MD5() exists.

                  推荐答案

                  如果不知道所看到的确切错误,就很难提供准确的解决方案.这是我最好的尝试.

                  Without knowing the exact errors you are seeing, it is difficult to provide an exact solution. Here is my best attempt.

                  从您提供的信息来看,链接器似乎失败了,因为它在 libssl.a 中找不到对 md5 函数的引用.我相信这个函数实际上在 libcrypto 中,所以你可能也需要指定这个库.

                  From the information you provided, it sounds as though the linker is failing because it cannot find a reference to the md5 function in libssl.a. I believe this function is actually in libcrypto so you may need to specify this library as well.

                  g++ server.cpp -L/usr/lib -lssl -lcrypto -o server

                  这篇关于如何在 GCC 中使用 OpenSSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:C++ 中的重载 lambda 以及 clang 和 gcc 之间的差异 下一篇:Gnu C++ 何时会在不明确要求的情况下支持 C++11?

                  相关文章

                  最新文章

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

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

                      <bdo id='epQFV'></bdo><ul id='epQFV'></ul>

                    1. <small id='epQFV'></small><noframes id='epQFV'>