MSYS/MingW 下编译OpenSSL需要注意的两点
-
这点超级搞,按下面的方式做,否则编译测试程序会出现:crt0_c.c:(.text.startup+0x39): undefined reference to `WinMain@16' 错误
- 下载openssl的源代码的tar.gz包,千万别用7-zip等打开
-
使用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
-
如果你使用MinGW64 不管是i686还是x86_64时, configure要用 mingw64. 比如,我用的是i686-w64-mingw32, 使用的命令是$./Configure mingw64 no-idea no-mdc2 no-rc5 no-asm shared --prefix=/e/Others/openssl