سؤال

First thanks a lot for reading my thread.

I am trying to use ImageMagick with VS2012 on Windows 7 64-bit for image rotation. Here is what I did:

  1. Download ImageMagick for windows, and unzip it.

  2. Go to \ImageMagick-6.8.8\VisualMagick\configure\ folder, open configure.dsw in VS2012, and build it. It was successful.

  3. open configure.exe in \ImageMagick-6.8.8\VisualMagick\configure\, and click "next" -> "finish" with default settings.

  4. After step 3, an VisualDynamicMT.sln is generated in \ImageMagick-6.8.8\VisualMagick. I opened it, and set it to x64 release, then I clicked "rebuild".

Some of the projects were built successfully, but many failed (total some 30 projects, and about 2/3 projects failed building)

----------There are many weird errors, such as:-------------

fatal error C1083: Cannot open include file: 'bzlib.h': No such file or directory

fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory

......

Then I searched, for example, 'cairo.h' in the downloaded \ImageMagick-6.8.8\ folder, it is not even in there!!! This is very frustrating. The package is not coming with everything it needs? Now I am not even sure can I use ImageMagick with VS2012?

Anyone has any experience with this topic? How to build ImageMagick with VS2012? I am totally lost. Thanks a million up front.

هل كانت مفيدة؟

المحلول

You can build ImageMagick in 64-bit with VS2012.

Just follow the following steps:

  1. Download ImageMagick-windows.zip from http://www.imagemagick.org/download/windows. This file contains the latest source code.

  2. Open configure.exe in \ImageMagick-6.X.X\VisualMagick\configure. If you want to build a 64 bit version of ImageMagick make sure you check "Build 64-bit distribution" in the "Build options". Click "next" -> "next" -> "finish".

  3. After step 3, an VisualDynamicMT.sln is generated in \ImageMagick-6.X.X\VisualMagick. Execute the file "UpgradeToVS2012.cmd" (requires Powershell) to upgrade your solution to VS2012. You can also just open the file VisualDynamicMT.sln without running "UpgradeToVS2012.cmd".
    Edit: With the latest version of ImageMagick this step is no longer required.

  4. After opening the solution make sure you change the platform in the dropdown to x64 if you checked "Build 64-bit distribution" in step 2. You are now ready to build ImageMagick.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top