This document outlines the requirements and step-by-step instructions needed to build ImageMagick for Windows from source on your own machine.
Requirements
- Visual Studio 2017 (or newer)
- Git for Windows
- AMD APP SDK (optional for OpenCL support)
Install Visual Studio Dependencies
To successfully build ImageMagick with Visual Studio, ensure the following components are installed:
- Desktop development with C++ (workload)
- Visual C++ ATL for x86 and x64
- Visual C++ MFC for x86 and x64
- Windows XP support for C++ (optional, if output needs to run on Windows XP)
Component names may vary depending on your specific version of Visual Studio; the example above reflects Visual Studio 2017 naming conventions.
Clone the Dependencies
The ImageMagick library relies on several third-party libraries. Run CloneRepositories.IM7.cmd to clone these libraries along with the main ImageMagick repository. If you need the legacy ImageMagick 6 library and its corresponding dependencies instead, run CloneRepositories.IM6.cmd.
Build Configure.exe
The project includes a Configure folder containing solution files: use Configure.sln for the latest 2022 version of Visual Studio, or Configure.2017.sln for older versions. Open the appropriate solution and initiate a Release build. This generates a Configure.exe utility in the folder, which launches a configuration wizard to customize ImageMagick and its components.
Build ImageMagick
Depending on the options selected during the configure.exe wizard, one of the following solution files will be created in your repository root:
- IM7.Dynamic.sln (Dynamic Multi-threaded DLL runtimes)
- IM7.StaticDLL.sln (Static Multi-threaded DLL runtimes)
- IM7.Static.sln (Static Multi-threaded runtimes)
Open your chosen solution to begin compiling ImageMagick. Upon completion, your compiled binaries will be located in the Output\bin folder.