openssl-1.1.1-pre1 windows環境下編譯

來源:互聯網
上載者:User

標籤:彙編   and   平台   指定   rsa   you   pack   vs2015   seed   

情境
         VS2015編譯openssl-1.1.1-pre1


工具
         nasm-2.14rc0-installer-x64.exe
         ActivePerl-5.24.3.2404-MSWin32-x64-404865.exe
         openssl-1.1.1-pre1.tar.gz


環境變數
 C:\Program Files\NASM(添加彙編器路徑)
 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin(VS2015編譯路徑)


操作
 1)perl Configure VC-WIN32 [no-shared] [no-asm] [no-tests] [--debug] --prefix=d:\openssllib
VC-WIN32:可根據需要修改為64位等,no-shared為編譯靜態庫,不加此項預設編譯出的是動態庫;no-tests為不需要tests功能,如果只需要openssl的庫可以加上此項,否則可能會出很多錯誤導致編譯不過;--debug為編譯debug版,不加此項預設編譯出的是release版。
 2)nmake,編譯通過後再nmake install就安裝到--prefix=指定的目錄了。
 3)如果要編譯多個版本(release,debug),最好先nmake clean下,再重複第3步驟。
注意:
1.VS工程的執行階段程式庫(Runtime Library)選擇應與編譯出的openssl庫匹配,尤其動態庫,否則可能編譯不過
2.需要使用靜態庫的時候,如果編譯不過,出現LNK2019等錯誤的時候,你可能還需要添加ws2_32.lib,crypt32.lib庫。
3.NASM彙編器沒有安裝出現如下錯誤
C:\Users\admin\Downloads\openssl-1.1.1-pre1>perl Configure VC-WIN32
Using implicit seed configuration
Configuring OpenSSL version 1.1.1-pre1 (0x10101001L) for VC-WIN32
NASM not found - please read INSTALL and NOTES.WIN for further details
4It looks like you don't have either nmake.exe or dmake.exe on your PATH錯誤解決方案
It looks like you don't have either nmake.exe or dmake.exe on your PATH,
so you will not be able to execute the commands from a Makefile.  You can
install dmake.exe with the Perl Package Manager by running:
ppm install dmake
解決:執行ppm install dmake,安裝dmake。
說明:ppm是perl圖形化包管理工具,dmake是同GNU Make類似的工具,支援跨平台
當前安裝VS2015,搜尋到nmake.exe,然後執行vcvarsall.bat,並且添加了VS的nmake路徑到環境變數還是有問題


openssl-1.1.1-pre1 windows環境下編譯

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.