你如何编译OpenSSL的用于基于x64的

你如何编译OpenSSL的用于基于x64的

本文介绍了你如何编译OpenSSL的用于基于x64的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照INSTALL.W64的指示后,我有两个问题:

  • 的code仍然写到out32文件夹中。我需要能够链接到32位和64位版本,我的工作站磁带库,所以我不希望64位版本揍了32位的库。
  • 输出仍然是32位!这意味着,我得到试图从64位应用程序链接到库时,解析的外部符号的错误。
解决方案

要编译静态库(包括发布和调试),这就是你需要做的:

  1. 在安装Perl - www.activestate.com
  2. 运行Visual Studio 2008中的x64跨工具命令提示符(注:常规命令提示符将无法正常工作。)
  3. 在配置与perl的配置VC-WIN64A没有共享没有想法
  4. 运行:MS \ do_win64a
  5. 在输出显示目录编辑MS \ nt.mak,改变32至64:

    #一切野趣的输出目录
    OUT_D = out64.dbg
    #所有临时渣土的输出目录
    TMP_D = tmp64.dbg
    #为头文件的输出目录
    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文件,并添加调试的所有线路,除ml64,最后两行
  4. 运行:MS \ do_win64a
  5. 在重复步骤4和5
  6. 编辑的MS \ nt.mak文件,并添加/紫到CFLAG清单!
  7. 运行:NMAKE -f MS \ nt.mak

After following the instructions in INSTALL.W64 I have two problems:

  • The code is still written to the "out32" folder. I need to be able to link to both 32-bit and 64-bit versions of the library on my workstation, so I don't want the 64-bit versions to clobber the 32-bit libs.
  • The output is still 32-bit! This means that I get "unresolved external symbol" errors when trying to link to the libraries from an x64 app.

解决方案

To compile the static libraries (both release and debug), this is what you need to do:

  1. Install Perl - www.activestate.com
  2. Run the "Visual Studio 2008 x64 Cross Tools Command Prompt" (Note: The regular command prompt WILL NOT WORK.)
  3. Configure withperl Configure VC-WIN64A no-shared no-idea
  4. Run: ms\do_win64a
  5. EDIT ms\nt.mak and change "32" to "64" in the output dirs:
    # 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. EDIT ms\nt.mak and remove bufferoverflowu.lib from EX_LIBS if you get an error about it.
  2. Run: nmake -f ms\nt.mak
  3. EDIT the ms\do_win64a file and ADD "debug" to all lines, except the "ml64" and the last two lines
  4. Run: ms\do_win64a
  5. Repeat steps 4 and 5
  6. EDIT the ms\nt.mak file and ADD /Zi to the CFLAG list!
  7. Run: nmake -f ms\nt.mak

这篇关于你如何编译OpenSSL的用于基于x64的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-27 11:55