在Borland c++ Builder下构建OpenSSL, Win 8.1

Building OpenSSL under Borland C++ Builder, Win 8.1

本文关键字:Win OpenSSL 构建 Borland c++ Builder      更新时间:2023-10-16

我遵循INSTALL的说明。W32(各种OpenSSL版本),一般是:

 * Configure for building with Borland Builder:
   > perl Configure BC-32
 * Create the appropriate makefile
   > msdo_nasm
 * Build
   > make -f msbcb.mak
现在,当我尝试构建时,我确实得到两种错误:

For OpenSSL <1.0.0

nasmw -f obj -d__omf__ -ocryptomd5asmm5_win32.obj .cryptomd5asmm5_win32.asm
'nasmw' is not recognized as an internal or external command,
operable program or batch file.
否则

Warning W8017 C:CBuilder5Includesys/stat.h 34: Redefinition of 'S_IFMT' is not identical
Warning W8017 C:CBuilder5Includesys/stat.h 35: Redefinition of 'S_IFDIR' is not identical
Error E2227 .cryptorandrandfile.c 226: Extra parameter in call to _open in function RAND_write_file
Warning W8053 .cryptorandrandfile.c 262: '_chmod(const signed char *,int,...)' is obsolete in function RAND_write_file
*** 1 errors in Compile ***

是的,我对使用Borland c++ Builder 5感到很糟糕,但我对此无能为力,是的,如果其他一切都失败了,我会考虑Shining Light选项。

我不使用OpenSSL,但从你的文本一些提示:

    NASM
    • 不是Borland编译器的默认汇编器
    • 你需要先下载并安装
    • (这是免费的,也是我过去使用过的最好的编译器之一)
  1. 您在包含OpenSSL之前缺少一些#define或包含顺序错误

    • ,这就是为什么你有第一个警告和最有可能的错误
    • 一些库需要添加配置#defines(由一些特定的IDE添加)
    • 指定编译器、平台、端序…使用
    • 之前包含
    • 通常如果你以错误的顺序包含,那么定义是为lib文件的某些实例定义的,而不是为所有实例定义的
    • 所以试着重新排序include
    • 有时有助于在lib之前包含其他一些东西,如conio, studio,windows,…
    • 确定哪个定义缺失或错误打开stat.h
    • S_IFMT
  2. 周围寻找#ifdef #ifndef语句

最新版本(1.0.2d)的解决方案是:

  1. 从randfile中删除额外的参数(如注释所述,这是不必要的),
  2. 编辑 bcb女士。马克,搜索-DMD5_ASM -DSHA1_ASM -DRMD160_ASM并改为-DMD5_NO_ASM -DSHA1_NO_ASM -DRMD160_NO_ASM。(SHA, MD5和RMD160存在未解决的外部错误,基本上无法在asm中编译)。

还包括其他一些步骤,但它们只是特定于我的环境。

在Windows XP SP3环境中,我添加了"-DOPENSSL_NO_POSIX_IO"到中央情报局的CFLAG。