http://www.kaosanakqu.com/kf/201512/454658.html
然后:1)打開:MSYS-x64 Shell(msys\1.0\bin\sh.exe)。以下操作都是在mingw64 shell中執行。
2)查看當前編譯環境的位版本(32或64):
$ cat /etc/profile
在最下面看到:
...... if [ -f /local32/etc/profile.local ]; then source /local32/etc/profile.local fi
使用tar zxfh openssl-1.0.2e.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 zxfh openssl-1.0.2e.tar.gz4)編譯openssl靜態庫和動態庫
$ cd /local32/src/openssl-1.0.2e $ perl Configure mingw shared --prefix=/usr/local/win32 $ make -j 4 $ make install編譯好的結果:頭文件,庫文件等安裝在目錄 /usr/local/win32/ssl 下面,對應真實目錄:
C:\DEVPACK\MinGW\msys\1.0\local\win32\ssl
1)打開:MSYS-x64 Shell(msys\1.0\bin\sh.exe)。以下操作都是在mingw64 shell中執行。
2)下載解壓: openssl-1.0.2e.tar.gz
$ cd /local64/src
$ wget http://www.openssl.org/source/openssl-1.0.2e.tar.gz
$ tar zxfh openssl-1.0.2e.tar.gz
3)改變編譯環境位數為x64 (僅對當前窗口有效):
$ source /local64/etc/profile.local
4)編譯openssl靜態庫和動態庫
$ cd openssl-1.0.2e $ perl Configure mingw64 shared --prefix=/usr/local/win64 $ make -j 4 $ make install