好吧,我真的不知道为什么这会解决问题,但我回滚到 ImageMagick-6.8.3-Q16,更改路径语句以引用旧版本的“ImageMagick-6.8.3-Q16”并重新安装使用 PPM 在 6.8.3 目录中的 Image-Magick PPD,然后再次重新引导系统。
C:\Program Files\ImageMagick-6.8.3-Q16\PerlMagick>perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
Binary build 1603 [296746] provided by ActiveState http://www.ActiveState.com
Built Mar 13 2013 11:29:21
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
C:\Program Files\ImageMagick-6.8.3-Q16\PerlMagick>ppm install Image-Magick.ppd
Unpacking Image-Magick-6.82...done
Generating HTML for Image-Magick-6.82...done
Updating files in site area...done
2 files unchanged
6 files updated
C:\Program Files\ImageMagick-6.8.3-Q16\PerlMagick>
我的代码现在运行时没有“Image::Magick::constant not defined”错误。我不确定这是否表明我的桌面配置有问题或与 ActivePerl 5.16.3 和 ImageMagick-6.8.4-Q16 冲突,但它解决了我的问题。