在 ActivePerl 上编译 WWW::Curl
我正在尝试(拼命地)在我的 activeperl 盒子上构建/安装最新版本的 WWW::Curl (我稍后会解释为什么我不使用 PPM)
我必须按照说明进行一些修改在这里找到: http://cpansearch.perl.org/src/SZBALINT/WWW -Curl-4.15/README.Win32
我还必须更改以下行:
From:
open(H_IN, "-|" "gcc", "$curl_h") and $has_cpp++;
To:
open(H_IN, "gcc $curl_h") and $has_cpp++;
我终于让 perl Makefile.PL 可以工作了,但是现在,当我运行 nmake 时,我得到以下信息:
Missing right curly or square bracket at -e line 1, at end of line
Execution of -e aborted due to compilation errors.
NMAKE: fatal error U1077: 'C;|windows\system32\cmd.exe' : return code '0xff'
Stop.
现在,我尝试编译它而不是使用 u.winnipeg 提供的 PPM 的原因是因为 PPM 似乎不支持 SSL 事务(我得到“libcurl: ssl 已禁用”)现在,如果有人可以向我展示如何让 ssl 在此 PPM 上运行,我非常乐意使用它。
预先非常感谢
I'm trying (desperately) to build / install the newest version of WWW::Curl onto my activeperl box (I'll explain in a moment why I don't use the PPM)
I had to make some modifications as per the instructions found here:
http://cpansearch.perl.org/src/SZBALINT/WWW-Curl-4.15/README.Win32
I also had to change the following line:
From:
open(H_IN, "-|" "gcc", "$curl_h") and $has_cpp++;
To:
open(H_IN, "gcc $curl_h") and $has_cpp++;
I finally got perl Makefile.PL to work but now, when I run nmake, I get the following:
Missing right curly or square bracket at -e line 1, at end of line
Execution of -e aborted due to compilation errors.
NMAKE: fatal error U1077: 'C;|windows\system32\cmd.exe' : return code '0xff'
Stop.
Now, the reason I'm trying to compile this rather than using the PPM supplied by u.winnipeg is because the that PPM doesn't seem to support SSL transaction (I get "libcurl: ssl disabled") Now, if anyone can show me how to get ssl to run on this PPM, I'm more than happy to use it.
Thank you very much in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为最初的
原因是你必须更改它,因为没有人抽出时间在 Windows 中实现功能。将其更改为
使用适合您的编译器的正确名称和语法。
I presume the original was
The reason you have to change that in because noone got around to implementing feature in Windows. Change it to
Use the right name and syntax for your compiler.
嗯,终于明白了,谢谢大家的回复。有很多事情我必须改变。
使用 http://cpansearch.perl.org/src/SZBALINT/ WWW-Curl-4.15/README.Win32 作为指南:
正如我上面所做的那样,打开的 cmd 工作得很好。不过,我确实使用了 ikegami、reinierpost 和 mob 返回的建议。
使用 nmake /n (按照套接字木偶的建议),它打印出所有正在执行的 perl 语句。我获取此输出并将其放入 .bat 文件中并更正了 perl 语法。
我将所有实例更改
为
(返回这些实例令人不安)
然后,我必须将 libcurl 库链接到实例化 g++ 的每一行,但这些实例未正确链接。添加这些参考资料后,其他一切都很顺利。
添加了以下内容:
现在,WWW::Curl 正在我的系统上愉快地运行。
至于使用PPM版本,正是因为SSL我才不得不升级。 WWW::Curl 的最新版本是 4.15,ppm 版本是(我相信)3.02。
Well, I finally figured it out, thanks to everyone who responded. There were a bunch of things I had to change.
Using http://cpansearch.perl.org/src/SZBALINT/WWW-Curl-4.15/README.Win32 as a guide:
The open cmd as I did above worked fine. However, I did use the advice returned by ikegami, reinierpost, and mob.
Using nmake /n (as advised by socket puppet), it printed out all of the perl statements which were being executed. I took this output and placed it into a .bat file and corrected the perl syntax.
I changed all instances of
to
(it is disturbing these were returned)
Then, I had to link the libcurl libraries to each line instantiating g++, which were not linked correctly. After I added these references, everything else went smoothly.
These were added:
Now, WWW::Curl is happily running on my system.
As for using the PPM version, it is exactly because of SSL I had to upgrade. The newest version of WWW::Curl is 4.15 the ppm version is (I believe) 3.02.
首先,很多人不知道可以使用 ppm 安装 MinGW使用cpan安装模块。
其次,如果您的模块提供的 libcurl 不支持 SSL,您可以尝试将其替换为 合适的 SSL下载页面的版本。这很可能会失败,但你也可能很幸运。
First, many people don't know that you can use ppm to install MinGW to use cpan to install modules.
Second, if the libcurl provided by your module doesn't do SSL, you can try and replace it with a suitable SSL version from the download page. This might well fail, but you might also be lucky.