【发布时间】:2015-04-15 07:08:55
【问题描述】:
我在 Windows 上运行 Strawberry Perl,需要使用 WWW::Curl::Easy。 但是“抱歉,Windows 上没有可用的自动安装”。
CPAN 上有一个 README.Win32:
Installation on Windows need to be done manually, by editing Makefile.PL.
1. Specify your curl include directory on the line "my @include = qw()".
2. Specify the following parameters on the line below, where <DIR> is your curl directory like this:
my ($cflags,$ldflags,$lflags) = ('-I"<DIR>\\include"', '-L"<DIR>\\lib"','-lcurl -lcurldll');
<DIR> can be for example: "E:\\Perldev\\downloader\\curl-7.18.2-devel-mingw32" (without quotes);
3. Save Makefile.PL.
4. Execute "perl Makefile.PL";
5. Execute "nmake" ( you may need nmake from Mircosoft, which can be downloaded from http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084 );
6. Execute "nmake install".
很遗憾,我不明白我需要怎么做。我想dmake而不是nmake应该是可能的,对吧?不同的“包含目录”是什么意思?
目前采取的步骤:
- 安装草莓perl
- 使用 ssl 下载并解压 libcurl(curl-7.40.0-devel-mingw32.zip)
- 从 CPAN 下载并提取 WWW::Curl
-
编辑 Makefile.pl
-#my @includes = qw();
+我的@includes = qw(C:\Strawberry\curl-7.40.0-devel-mingw32\include);
-#my ($cflags,$lflags, $ldflags) = ('','','');
+my ($cflags,$ldflags,$lflags) = ('-I"C:\Strawberry\curl-7.40.0-devel-mingw32\include"', '-L"C:\Strawberry\curl-7.40. 0-devel-mingw32\lib"','-lcurl -lcurldll');
...
-#replace open(H_IN, "-|", "gcc $curl_h");
+open(H_IN, "|gcc $curl_h"); - 编辑 curl.xs(工作进行中)
有人可以举例说明安装步骤吗?
非常感谢任何帮助!谢谢。
【问题讨论】: