How to Build ImageMagick-6.8.8 or ImageMagick-6.9.1 sources on Visual Studio 2012

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
SanjayJadhav
Posts: 11
Joined: 2015-05-22T06:43:00-07:00
Authentication code: 6789

How to Build ImageMagick-6.8.8 or ImageMagick-6.9.1 sources on Visual Studio 2012

Post by SanjayJadhav »

Hi Team,

Can somebody help me in building the ImageMagick Exe from the ImageMagick sources.

I have performed following steps mentioned at http://www.imagemagick.org/script/advan ... lation.php , but could not proceed beyond one point.

Note:
1.I am using Visual Studio 2012 for this. Is it necessary to use Visual Studio 7 for this.
2. My machine is 64 bit.
3. OS : windows 7 enterprise
4.From the above link I am following Create a Self-Installing Binary Distribution section after Unzip of source and building Configuration.


Steps Followed:
A.Prerequisites
1.Download and install Inno Setup 5. ---This step is done.
2.Download and install ActiveState ActivePerl. ---This step is done.

B.Run the Configure Wizard
1.Double-click on VisualMagick/configure/configure.sln to build the configure wizard. ---This step is done.
2.Select Rebuild All and launch the configure wizard. ---This step is done.
3.Complete the configure wizard screens to create the ImageMagick Visual C++ workspace. ---This step is done.


C.Build ImageMagick
1.Double-click on VisualMagick/VisualDynamicMT.sln to launch the ImageMagick Visual workspace. ---This step is done.
2.Set the active configuration to Win32 Release. ---COULD NOT DO THIS
(Note I am using Visual Studio 2012 for this.).
3.Select Rebuild All to build the ImageMagick binary distribution. --COUD NOT PROCEED


Issues:
1. Because of the above step " C " issue. I could not proceed with the further steps mentioned at the site.
Now if I go to Build --> Configuration Manager --> Active Solution Plat form --> Win 32 and then rebuild . It gives compilation error.

Error1 : MSB6006: "cmd.exe" exited with code 9009. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 172 5 CORE_ffi

Error2 : LNK1112: module machine type 'X86' conflicts with target machine type 'x64' C:\ImageMagick-windows\ImageMagick-6.9.1\VisualMagick\bzlib\Release\blocksort.obj 1 1 CORE_bzlib

Error3 : LNK1181: cannot open input file 'C:\ImageMagick-windows\ImageMagick-6.9.1\VisualMagick\lib\CORE_RL_jp2_.lib'

2. The step where I am getting above errors says that "Set the active configuration to Win32 Release". Does it mean I need to build this sources on the 32 bit machine? because If I built it keeping the active configuration to 64 bit It gets compiled successfully but fails at "Build ImageMagickObject" step.
This step "Build ImageMagickObject" say that
1.Launch the Command Prompt application and move to the contrib\win32\ATL7\ImageMagickObject folder.
2.Build ImageMagickObject with these commands:
Here error seen is "ImageMagickObject " is a unrecognized command.

3. Can somebody also tell me where I can find sources of ImageMagick 6.8.8-10 or ImageMagick 6.8.8-16. I have downloaded it from http://mirrors-usa.go-parts.com/mirrors ... /releases/ . but this sources do not contain the VisualMagick folder. Hence could not proceed to Run the Configure Wizard
roelandsch
Posts: 20
Joined: 2014-10-27T16:10:38-07:00
Authentication code: 6789

Re: How to Build ImageMagick-6.8.8 or ImageMagick-6.9.1 sources on Visual Studio 2012

Post by roelandsch »

When I compiled ImageMagick 6.9.0 there were also two scripts, called UpgradeToVS2010.cmd and UpgradeToVS2012.cmd. I had to run the correct one before opening the solution file or it wouldn't work.

In version 6.9.1 the Configure Wizard has a dropdown to select the version of Visual Studio to use.

And of course, if you make a 64-bit distribution, set the configuration to Release|x64.

--
Roeland
Post Reply