gpt4 book ai didi

c++ - 你如何为 x64 编译 OpenSSL?

转载 作者:IT老高 更新时间:2023-10-28 22:25:01 27 4
gpt4 key购买 nike

按照 INSTALL.W64 中的说明操作后,我遇到了两个问题:

  • 代码仍写入“out32”文件夹。我需要能够在我的工作站上链接到 32 位和 64 位版本的库,所以我不希望 64 位版本破坏 32 位库。
  • 输出仍然是 32 位!这意味着我在尝试从 x64 应用链接到库时收到“未解析的外部符号”错误。

最佳答案

要编译静态库(发布和调试),您需要这样做:

  1. 安装 Perl - www.activestate.com
  2. 运行“Visual Studio 2008 x64 Cross Tools 命令提示符”(注意:常规命令提示符将不起作用。)
  3. 配置为perl 配置VC-WIN64A no-shared no-idea
  4. 运行:ms\do_win64a
  5. 编辑 ms\nt.mak 并将输出目录中的“32”更改为“64”:
    # The output directory for everything intersting    OUT_D=out64.dbg    # The output directory for all the temporary muck    TMP_D=tmp64.dbg    # The output directory for the header files    INC_D=inc64    INCO_D=inc64\openssl
  1. 如果遇到错误,请编辑 ms\nt.mak 并从 EX_LIBS 中删除 bufferoverflowu.lib。
  2. 运行:nmake -f ms\nt.mak
  3. 编辑 ms\do_win64a 文件并将“debug”添加到所有行,“ml64”和最后两行除外
  4. 运行:ms\do_win64a
  5. 重复第 4 步和第 5 步
  6. 编辑 ms\nt.mak 文件并将/Zi 添加到 CFLAG 列表中!
  7. 运行:nmake -f ms\nt.mak

关于c++ - 你如何为 x64 编译 OpenSSL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/158232/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com