1

我正在尝试为草莓 perl 构建/安装 WWW::Curl 模块。

我必须根据以下说明在 Makefile.PL 中进行一些调整:http: //cpansearch.perl.org/src/SZBALINT/WWW-Curl-4.15/README.Win32

并在这里:在 WINdows 7 上安装 WWW::Curl,运行到“未实现管道打开的列表形式”

当我在命令提示符处执行perl Makefile.PL时,我收到以下消息:

Found curl.h in d:\curldev\include\curl\curl.h
Building curlopt-constants.c for your libcurl version
Building Easy.pm constants for your libcurl version
Building Share.pm constants for your libcurl version
Warning (mostly harmless): No library found for -lcurl
Warning (mostly harmless): No library found for -lcurldll
Writing Makefile for WWW::Curl
Writing MYMETA.yml and MYMETA.json

之后,当我运行dmake时,我收到以下错误消息:

D:\perl\cpan\build\WWW-Curl>dmake
Skip blib\lib\WWW\Curl\Share.pm (unchanged)
Skip blib\lib\WWW\Curl\Form.pm (unchanged)
Skip blib\lib\WWW\Curl.pm (unchanged)
Skip blib\lib\WWW\Curl\Easy.pm (unchanged)
Skip blib\lib\WWW\Curl\Multi.pm (unchanged)
gcc -c  -Id:\curldev\include    -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IM
PLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -s -O2
  -DVERSION=\"4.15\"    -DXS_VERSION=\"4.15\"  "-ID:\perl\perl\lib\CORE"   Curl.
c
Curl.xs: In function 'XS_WWW__Curl__Easy_init':
D:\perl\perl\lib\CORE/XSUB.h:526:20: error: 'PerlSIO_fread' undeclared (first us e in this function)
D:\perl\perl\lib\CORE/XSUB.h:526:20: note: each undeclared identifier is reported only once for each function it appears in
Curl.xs:620: confused by earlier errors, bailing out
dmake:  Error code 129, while making 'Curl.o'

问题是:是什么导致了这个错误?可能与运行 Makefile.PL 后消息中的警告行有关,但不确定。

提前致谢。

4

2 回答 2

0

这听起来可能很疯狂,但我可以通过注释掉相应文件中未声明的变量来克服这个问题。它还抱怨 PerlISO_fwrite 或类似的东西。您也必须对此发表评论

于 2013-06-10T06:10:38.950 回答
0

https://rt.cpan.org/Public/Bug/Display.html?ShowHeaders=1;id=62609

将此添加到 curl.xs 文件中可以修复它:

#include "XSUB.h"

/* add new code here */
#ifdef fread
#undef fread
#endif
#ifdef fwrite
#undef fwrite
#endif

/* end new code */ 

#include <curl/curl.h>
于 2015-01-02T19:20:40.763 回答