Win32 binaries & strawberry perl
Posted: 2009-10-07T06:13:33-07:00
Hi,
I have tried to install Image::Magick module on win32/strawberry perl using official ImageMagick Win32 binaries.
The good news is that it is feasible, however there are some gotchas that can make it quite difficult for an inexperienced user.
(1) I have used ImageMagick-6.5.6-9-Q16-windows-dll.exe
This pack includes also a development files but only for Microsoft compiler. (Un)fortunately strawberry perl uses MINGW compiler (gcc for win32). To be able to use official Windows binaries it was necessary to create mingw-compatible import libraries (*.a) - to do this it was necessary:
The output were these new files:
(2) After that it was necessary to slightly patch Makefile.pl in order to use proper directories with headers (d:\ImageMagick-6.5.6-Q16\include) and libraries (d:\ImageMagick-6.5.6-Q16\lib).
I have just a quick-and-dirty patch at the moment as I do not know what is the proper way to get the information where are ImageMagick's ./lib and ./include directories.
Question 2: What is the right way to get information about ImageMagick's ./lib and ./include directories?
(3) As you already support Image::Magick for Active Perl instalation it might be also interesting to add an option "install Image::Magick for Strawberry perl" to Windows binaries installer.
My idea is to arrange all things so that the following 3 steps will smoothly work:
--
kmx
I have tried to install Image::Magick module on win32/strawberry perl using official ImageMagick Win32 binaries.
The good news is that it is feasible, however there are some gotchas that can make it quite difficult for an inexperienced user.
(1) I have used ImageMagick-6.5.6-9-Q16-windows-dll.exe
This pack includes also a development files but only for Microsoft compiler. (Un)fortunately strawberry perl uses MINGW compiler (gcc for win32). To be able to use official Windows binaries it was necessary to create mingw-compatible import libraries (*.a) - to do this it was necessary:
Code: Select all
cd d:\ImageMagick-6.5.6-Q16\lib
pexports ..\CORE_RL_magick_.dll > libMagickCore.def
dlltool -D CORE_RL_magick_.dll -l libMagickCore.a -d libMagickCore.def
del libMagickCore.def
pexports ..\CORE_RL_wand_.dll > libMagickWand.def
dlltool -D CORE_RL_wand_.dll -l libMagickWand.a -d libMagickWand.def
del libMagickWand.def
Question 1: Do you think it would be possible to include also mingw-compatible import libraries (libMagickCore.a + libMagickWand.a) into the official Windows binaries?d:\ImageMagick-6.5.6-Q16\lib\libMagickCore.a
d:\ImageMagick-6.5.6-Q16\lib\libMagickWand.a
(2) After that it was necessary to slightly patch Makefile.pl in order to use proper directories with headers (d:\ImageMagick-6.5.6-Q16\include) and libraries (d:\ImageMagick-6.5.6-Q16\lib).
I have just a quick-and-dirty patch at the moment as I do not know what is the proper way to get the information where are ImageMagick's ./lib and ./include directories.
Question 2: What is the right way to get information about ImageMagick's ./lib and ./include directories?
- is it MAGICK_HOME env variable?
- can 'identify -list Configure' provide some reasonable hints?
- or is there another way?
(3) As you already support Image::Magick for Active Perl instalation it might be also interesting to add an option "install Image::Magick for Strawberry perl" to Windows binaries installer.
My idea is to arrange all things so that the following 3 steps will smoothly work:
- install strawberry perl
- install ImageMagick binaries (inc. dev files)
- simply install Image::Magick by running: cpan Image::Magick
--
kmx