http://www.perlmonks.org?node_id=985594


in reply to Error trying to install Image::Magick on Strawberry Perl

How do I pass the hint to gcc about where to find MagickCore.h?

Add to %PATH% so the .dll's can be found

cpanp -z Image::Magick

perl Makefile.PL LIBS="-Lpath\to\directory -llibname -libname... " INC="-Ipath/to/includes -Ipath/to/other/includes"

If your Makefile.PL is being too clever, you should edit Makefile.PL and prefix :nosearch

For microsoft you could set (like PATH) env vars INCLUDE= for .h-headers and LIB= for .lib's -- I can't remember if mingw/gcc also respects this, so if it doesn't, you'd set C_INCLUDE_PATH/LIBRARY_PATH, see http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html

  • Comment on Re: Error trying to install Image::Magick on Strawberry Perl

Replies are listed 'Best First'.
Re^2: Error trying to install Image::Magick on Strawberry Perl
by denishowe (Acolyte) on Jul 27, 2014 at 09:01 UTC
    Recent versions of Makefile.PL automatically locate the ImageMagick installation using IM's "identify" command. That will only work if IM is in your path (which is an installation option). Check like this:
    C:\>path PATH=C:\Program Files\ImageMagick;C:\bin;...
    You will also need to replace "-lMagickCore-6.Q16" with "-lMagickCore" in Makefile.PL and comment out the RadialBlur case in Magick.xs, as described in http://www.imagemagick.org/discourse-server/viewtopic.php?f=7&t=25746&p=113771#p113771.