MSYS/MingW 下编译OpenSSL需要注意的两点

  1. 这点超级搞,按下面的方式做,否则编译测试程序会出现:crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16' 错误
    1. 下载openssl的源代码的tar.gz包,千万别用7-zip等打开
    2. 使用tar xfhz openssl-x.y.zr.tar.gz 解包。原因是

      + Since the release tarballs contain symlinks which MSYS cant deal with
      + you must use tar with the -h option to dereference the symlinks:
      + tar xfhz openssl-x.y.zr.tar.gz

  2. 如果你使用MinGW64 不管是i686还是x86_64时, configure要用 mingw64. 比如,我用的是i686-w64-mingw32, 使用的命令是
    $./Configure mingw64 no-idea no-mdc2 no-rc5 no-asm shared --prefix=/e/Others/openssl
posted @ 2014-01-28 13:25  拔剑四顾  阅读(917)  评论(0编辑  收藏  举报