gpt4 book ai didi

perl - 在 Cygwin 上编译 PAR::Packer 时如何修复 "gcc: winrespp.rc: No such file or directory"?

转载 作者:行者123 更新时间:2023-12-05 00:35:48 27 4
gpt4 key购买 nike

我已尝试安装 PAR::Packer在 32 位机器上的 Cygwin for Windows 中,所以我执行了 cpan pp。我面临以下问题。

gcc-4 -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include  -I/usr/lib/perl5/5.14/i686-cygwin-threads-64int/CORE  -DPARL_EXE=\parl.exe\ -O3 main.c windres -F pei-i386 -i winres\pp.rc -o winres\pp.res
gcc: winrespp.rc: No such file or directory
gcc: warning: '-x c' after last input file has no effect
gcc: no input files
windres: preprocessing failed.
Makefile:735: recipe for target ppresource.coff failed
make[1]: *** [ppresource.coff] Error 1
make[1]: Leaving directory /home/prabhakaran.srinivas/.cpan/build/PAR-Packer-1.013-eTAwxL/myldr
Makefile:594: recipe for target subdirs failed
make: *** [subdirs] Error 2
RSCHUPP/PAR-Packer-1.013.tar.gz
make -- NOT OK
CPAN: YAML loaded ok (v0.81)
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible

最佳答案

问题出在myldr/Makefile.PL :

$pre_res = qq(winres\\pp.res);
$rt_cmd = qq(windres -F pei-i386 -i winres\\pp.rc -o $pre_res);
$res_cmd = qq(windres -o ppresource.coff $pre_res);
$res_section = $res;

然后,

$res_section:
$rt_cmd
$res_cmd

在 Cygwin 的 bash 下,winres\pp.rc 将被解释为 winrespp.rc 而不是 winres/pp.rc。正确的方法是

$pre_res = catfile(winres => 'pp.res');
$rt_cmd = join ' ' => qw(windres -F pei-i386 -i), catfile(winres => 'pp.rc'), '-o', $pre_res;

等等

关于perl - 在 Cygwin 上编译 PAR::Packer 时如何修复 "gcc: winrespp.rc: No such file or directory"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10848189/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com