{"id":230,"date":"2025-02-14T11:41:28","date_gmt":"2025-02-14T03:41:28","guid":{"rendered":"http:\/\/www.winradar.com\/?p=230"},"modified":"2025-02-14T11:41:28","modified_gmt":"2025-02-14T03:41:28","slug":"libcurl%e7%bc%96%e8%af%91%e6%94%af%e6%8c%81xp%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"http:\/\/www.winradar.com\/?p=230","title":{"rendered":"libcurl\u7f16\u8bd1\u652f\u6301xp\u7cfb\u7edf"},"content":{"rendered":"<h1>\u524d\u8a00<\/h1>\n<p>libcurl\u662f\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u7f51\u7edc\u534f\u8bae\u5e93\uff0c\u652f\u6301http\u3001https\u548cftp\u7b49\u5927\u90e8\u5206\u5e38\u7528\u534f\u8bae\uff0c\u7a0b\u5e8f\u4e2d\u53ef\u4ee5\u65b9\u4fbf\u7684\u4f7f\u7528HTTP POST\u3001HTTP PUT\u3001FTP \u4e0a\u4f20\u3001HTTP\u57fa\u672c\u8868\u5355\u4e0a\u4f20\u7b49\u64cd\u4f5c\u3002<\/p>\n<h1>\u4e00\u3001\u4e3a\u4ec0\u4e48\u8981\u7f16\u8bd1libcurl\uff1f<\/h1>\n<p>libcurl\u9ed8\u8ba4\u4f7f\u7528\u4e00\u4e9bxp\u4e0d\u652f\u6301\u7684API\u51fd\u6570\uff0c\u4f8b\u5982\uff1aInitializeCriticalSectionEx\uff0c\u5982\u679c\u76f4\u63a5\u4f7f\u7528\u4f1a\u63d0\u793a\u627e\u5230\u5bf9\u5e94\u7684\u63a5\u53e3\u51fd\u6570\uff0c\u9879\u76ee\u4e3a\u4e86\u652f\u6301XP\uff0c\u9700\u8981\u91cd\u65b0\u7f16\u8bd1libcurl\u3002<\/p>\n<h1>\u4e8c\u3001\u7f16\u8bd1\u6b65\u9aa4<\/h1>\n<h2>1.\u51c6\u5907\u7f16\u8bd1\u5de5\u5177\uff1aActivePerl\u3001DMake\u3001NASM<\/h2>\n<p>\u4e0b\u8f7d\u5b89\u88c5Perl\u7a0b\u5e8f\uff0c\u7528\u6765\u7f16\u8bd1OpenSSL\uff0c\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n<pre><code class=\"lang-cpp language-cpp cpp\">ActivePerl\uff1ahttps:\/\/www.activestate.com\/products\/perl\/\nStrawberry Perl\uff1a https:\/\/strawberryperl.com\/download\/5.32.1.1\/strawberry-perl-5.32.1.1-64bit.msi<\/code><\/pre>\n<p>\u4e0b\u8f7d\u5b89\u88c5DMake\uff0c\u53ef\u4ee5\u5355\u72ec\u4e0b\u8f7d\uff0c\u4e5f\u53ef\u4ee5\u5b89\u88c5Perl\u540e\uff0c\u5728\u63a7\u5236\u53f0\u76f4\u63a5\u4f7f\u7528PPM\u6765\u5b89\u88c5\uff0c\u5b89\u88c5\u811a\u672c\uff1a<\/p>\n<pre><code class=\"lang-cpp language-cpp cpp\">PPM install dmake<\/code><\/pre>\n<p>\u4e0b\u8f7d\u5b89\u88c5NASM\uff0c\u4e0d\u4f7f\u7528\u53ef\u4ee5\u4e0d\u5b89\u88c5\uff0c\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n<pre><code class=\"lang-cpp language-cpp cpp\">https:\/\/www.nasm.us\/pub\/nasm\/releasebuilds\/?C=M<\/code><\/pre>\n<h2>2.\u7f16\u8bd1OpenSSL\uff0c\u652f\u6301XP\u7cfb\u7edf<\/h2>\n<p>\u4e0b\u8f7dOpenSSL v1.0\u7248\u672c\uff1a<a href=\"https:\/\/codeload.github.com\/openssl\/openssl\/zip\/OpenSSL_1_0_2u\">OpenSSL_1_0_2u<\/a>\uff0c\u4e0b\u8f7d\u540e\u628a\u6e90\u7801\u89e3\u538b\u5230d:\\github\\openssl\u76ee\u5f55\u3002\n\u6839\u636e\u9879\u76ee\u4f7f\u7528\u7684VS\u7248\u672c\uff0c\u9009\u62e9\u76f8\u5e94\u7684\u7f16\u8bd1\u5de5\u5177\uff0c\u4f8b\u5982\u6211\u9009\u62e9&#8221;VS2012 x86 \u672c\u673a\u5de5\u5177\u547d\u4ee4\u63d0\u793a&#8221;\uff0c\u901a\u8fc7\u547d\u4ee4\u884c\u8fdb\u5165\u5230OpenSSL\u7684\u6e90\u7801\u76ee\u5f55\uff0c\u7136\u540e\u6267\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code class=\"lang-c language-c c\">perl configure VC-WIN32 no-shared --prefix=&quot;d:\\github\\openssl\\build_x86&quot;<\/code><\/pre>\n<p>\u5982\u679c\u9700\u8981\u7f16\u8bd1debug\u7248\u672c\uff0c\u5219\u4f7f\u7528\u4e00\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code class=\"lang-cpp language-cpp cpp\">perl configure debug-VC-WIN32 no-shared --prefix=&quot;d:\\github\\openssl\\build_x86&quot;<\/code><\/pre>\n<ul>\n<li><strong>VC-WIN32<\/strong> \u8868\u793a\u7f16\u8bd1\u51fa\u6765\u7684\u7a0b\u5e8f\u65f632\u4f4d\u7684(x86)\uff0c64\u4f4d\u7a0b\u5e8f\u4f7f\u7528<strong>VS_WIN64A<\/strong>(A\u4ee3\u8868AMD64)\u6216\u8005<strong>VC-WIN64I<\/strong>\uff08I\u4ee3\u8868IA64)<\/li>\n<li><strong>no-shared<\/strong> \u8868\u793a\u7f16\u8bd1\u9759\u6001\u5e93\uff0c\u5982\u679c\u9700\u8981\u7f16\u8bd1\u52a8\u6001\u5e93\uff0c\u53bb\u6389\u6b64\u9009\u9879<\/li>\n<li><strong>\u2013prefix<\/strong>\u540e\u9762\u8ddf\u7684\u662f\u7f16\u8bd1\u5b8c\u6210\u4fdd\u5b58\u7684\u76ee\u5f55<\/li>\n<\/ul>\n<p>\u7f16\u8bd1OpenSSL\u9759\u6001\u5e93\uff1a<\/p>\n<pre><code class=\"lang-cpp language-cpp cpp\">ms\\do_ms.bat \nnmake -f ms\\nt.mak \nnmake -f ms\\nt.mak test\nnmake -f ms\\nt.mak clean\nnmake -f ms\\nt.mak install<\/code><\/pre>\n<p>\u7f16\u8bd1OpenSSL\u52a8\u6001\u5e93\uff1a<\/p>\n<pre><code class=\"lang-cpp language-cpp cpp\">ms\\do_ms.bat \nnmake -f ms\\ntdll.mak \nnmake -f ms\\ntdll.mak test\nnmake -f ms\\ntdll.mak clean\nnmake -f ms\\ntdll.mak install<\/code><\/pre>\n<p>\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728d:\\github\\openssl\\build_x86\u76ee\u5f55\u4e0b\u770b\u5230\u751f\u6210\u7684lib\u5e93\u3002<\/p>\n<h2>3.\u7f16\u8bd1libcurl<\/h2>\n<p>\u4ecegithub\u4e0a\u4e0b\u8f7dcurl-7.69.1\u7248\u672c\u5230d:\\github\u76ee\u5f55\u4e0b\uff0c\u4f7f\u7528VS2012\u6253\u5f00Curl\u9879\u76ee\uff08\u9879\u76ee\u5728\u201cd:\\github\\curl-7.69.1\\projects\\Windows\\VC11\u201d\uff09\u3002\u6309\u7167\u5e38\u89c4\u7684\u4f9d\u8d56\u5e93\u914d\u7f6e\u65b9\u5f0f\uff0c\u628aOpenSSL\u7684\u5934\u6587\u4ef6\u548c\u5e93\u76ee\u5f55\u914d\u7f6e\u597dcurl\u9879\u76ee\uff0c\u7136\u540e\u6839\u636e\u9700\u6c42\u9009\u62e9\u7f16\u8bd1\u9009\u9879\u5373\u53ef\uff0c\u4f8b\u5982\uff1a\n<a href=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/eb1b2fb1ad7189e7a454afb3a717b027.png#pic_center\">https:\/\/i-blog.csdnimg.cn\/blog_migrate\/eb1b2fb1ad7189e7a454afb3a717b027.png#pic_center<\/a>\n\u4e3a\u4e86\u652f\u6301XP\u7cfb\u7edf\uff0c\u7f16\u8bd1\u5de5\u5177\u4e00\u5b9a\u8981\u9009\u62e9\u652f\u6301XP\u7684\u9009\u9879\uff1a\n<a href=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/3bd950303985d902c4a181d80a16ca50.png#pic_center\">https:\/\/i-blog.csdnimg.cn\/blog_migrate\/3bd950303985d902c4a181d80a16ca50.png#pic_center<\/a>\n\u7f16\u8bd1\u6210\u529f\u540e\u5c31\u53ef\u4ee5\u5728curl\u7684build\u76ee\u5f55\u4e0b\u770b\u5230\u7f16\u8bd1\u597d\u7684\u5e93\u6587\u4ef6\u4e86\uff1a\n<a href=\"https:\/\/i-blog.csdnimg.cn\/blog_migrate\/66c53dbd12d6ed0cddf0727e30af2267.png#pic_center\">https:\/\/i-blog.csdnimg.cn\/blog_migrate\/66c53dbd12d6ed0cddf0727e30af2267.png#pic_center<\/a><\/p>\n<h1>\u603b\u7ed3<\/h1>\n<p>\u7f16\u8bd1openssl\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u8fd8\u4f1a\u9047\u5230\u94fe\u63a5\u52a0\u5bc6\u5e93\u5931\u8d25\u7684\u95ee\u9898\uff0c\u5982\u679c\u9047\u5230\u5728\u9879\u76ee\u94fe\u63a5\u5e93\u91cc\u9762\u914d\u7f6e\u597dCrypt32.lib\u5373\u53ef\u7f16\u8bd1\u6210\u529f\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 libcurl\u662f\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u7f51\u7edc\u534f\u8bae\u5e93\uff0c\u652f\u6301http\u3001https\u548cftp\u7b49\u5927\u90e8\u5206\u5e38\u7528\u534f\u8bae\uff0c\u7a0b\u5e8f\u4e2d\u53ef\u4ee5\u65b9\u4fbf\u7684\u4f7f\u7528HTTP POST\u3001HTTP PUT\u3001FTP \u4e0a\u4f20\u3001HTTP\u57fa\u672c\u8868\u5355\u4e0a\u4f20\u7b49\u64cd\u4f5c\u3002 \u4e00\u3001\u4e3a\u4ec0\u4e48\u8981\u7f16\u8bd1libcurl\uff1f libcurl\u9ed8\u8ba4\u4f7f\u7528\u4e00<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-230","post","type-post","status-publish","format-standard","hentry","category-opensource","comments-off"],"_links":{"self":[{"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.winradar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230"}],"version-history":[{"count":1,"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions"}],"predecessor-version":[{"id":231,"href":"http:\/\/www.winradar.com\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions\/231"}],"wp:attachment":[{"href":"http:\/\/www.winradar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.winradar.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.winradar.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}