<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ### libcurl編譯-windows-x64 文章時間:2020-11-16 網上找了一堆資料,五花八門,幾個文章弄下來才編譯過。這里做一個記錄,也順帶讓想編譯curl庫的朋友,做個借鑒。 首先編譯curl需要 libcurl,openssl,zlib 我放的目錄是 cpps/deps下。 ![](https://img.kancloud.cn/34/d9/34d93218a1fd9e5e99324874f2b5caa4_394x221.png) 自己可以調整自己所需要的目錄。 libcurl下載地址:https://curl.se/download.html openssl下載地址:https://www.openssl.org/source/ zlib下載地址:http://www.zlib.net/ 需要安裝的軟件都知道 perl,python, NASM 其他什么我就不復數,自行百度吧。 ![](https://img.kancloud.cn/a6/0b/a60b37f2c97639d98b1fb16f0e12a52d_238x124.png) 我使用的版本號都是目前最新的。 \ \ 首先打開VS命令工具 我這里只編譯64位。所以選擇X64 ![](https://img.kancloud.cn/6e/c3/6ec3a2974da468f3f84463f901699032_278x394.png) 第一步編譯 zlib - 進入到zlib 目錄 \ 輸入 X64 ``` nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF -I." OBJA="inffasx64.obj gvmat64.obj inffas8664.obj" ``` X86 ``` nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="inffas32.obj match686.obj" ``` \ ![](https://img.kancloud.cn/28/79/287972649004038672d0497027edff12_993x519.png) 編譯好后,進入下一步。 \ \ 第二步 編譯openssl - 同樣進入 openssl目錄 ![](https://img.kancloud.cn/a4/be/a4be02393d03cc02be78e0a1d5b77154_993x519.png) 輸入 X64 ``` perl Configure VC-WIN64A --prefix=D:\work\code\apiserver\cpps\deps\openssl-1.1.1h\build no-asm nmake nmake install ``` X86 ``` perl Configure VC-WIN32 --prefix=D:\work\code\apiserver\cpps\deps\openssl-1.1.1h\build no-asm nmake nmake install ``` 最后可能會有錯誤,提示找不到什么文件,無所謂忽視他。 確定文件夾里面多了一個 build文件夾就可以了 (--prefix= 地址\build)我用的地址+build文件夾 所以是build 換其他文件夾就是其他文件夾名 編譯好,下一步。 \ \ 第三步 編譯libcurl - 編譯好 zlib 與 openssl 后,這里需要把頭文件和lib文件分別拷貝到相應目錄 openssl目錄下:build的include與lib 拷貝到 deps/deps目錄里 (需要手動建立) ![](https://img.kancloud.cn/85/52/85520104b67924a1a9f9db53f1757fc3_500x208.png) zlib目錄下:zconf.h , zlib.h , zutil.h 拷貝到 deps/deps/include里面 zlib.lib zdll.lib 拷貝到 deps/deps/lib 里 ![](https://img.kancloud.cn/58/52/585229b0b174a330a24fbc3a4a8085b6_599x226.png) \ 開始編譯 - 同樣進入 curl目錄 在進入 winbuild ![](https://img.kancloud.cn/9c/9e/9c9edfc5afb04c1682ca7e94a4142131_993x519.png) 輸入 X64 ``` cd winbuild nmake /f Makefile.vc mode=dll MACHINE=x64 VC=15 ENABLE_IPV6=yes WITH_SSL=dll WITH_ZLIB=dll DEBUG=no ``` X86 ``` cd winbuild nmake /f Makefile.vc mode=dll VC=15 WITH_SSL=dll ENABLE_IPV6=yes WITH_ZLIB=dll DEBUG=no ``` 編譯完成后 ![](https://img.kancloud.cn/be/ed/beed0474afd27bdfd90eab6f26447151_630x243.png) 有個builds文件夾 進入 libcurl-vc15-x64-release-dll-ssl-dll-zlib-dll-ipv6-sspi 分別把include 與 lib拷貝到 deps/deps里面 \ **使用libcurl記得添加宏定義:BUILDING\_LIBCURL;** (curl我已經添加好了) \ 至此編譯結束。 就可以開始編譯 demo/curl 啦。 尾語: 我覺得編譯就是干貨,網上的文章亂七八糟的。 最后說下 dll 部分 openssl 和 libcurl 都生成了 bin目錄 自己拷貝下dll就好了。zlib在根目錄有個zlib1.dll ![](https://img.kancloud.cn/c7/2a/c72a96a69b3ae0ed7c2850c9a5592508_190x109.png) ****
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看