Magick++ (ImageMagick C++ API) install

Installation of Magick++ that is C++ API of ImageMagick.
I installed ImageMagick version 6.7.7-3 with Visual Studio 2008 under Windows7 64bit.

1. Download the source files
ImageMagick web
Go to Download page from left side bar and go to a mirror server. Then, download windows -> ImageMagick-windows.zip or ImageMagick-windows.7z

2. Compile
Let DIR_ROOT denotes a root directory of unpacked file. In DIR_ROOT, there is a file, named Install-windows.txt, describing a procedure of installation. Basically, you can install Magick++ by following the file.

This step is done in a directory DIR_ROOT\VisualMagick.

2.1. Configure
First step is to configure the Visual Studio workspaces for ImageMagick. ImageMagick provides 2 ways for this configuration: using a pre-built .exe file and using an own-built .exe file.
1) Configure from pre-built .exe file
Go to DIR_ROOT\VisualMagick\configure and run configure.exe. By following the UI, Visual Studio .sln file is generated in DIR_ROOT\VisualMagick. Install-windows.txt provides further detail about options of configure.exe.

2) Configure from own-built .exe file
If the above .exe file does not work or you want to configure from scratch, you can choose this way.
Open configure.sln in DIR_ROOT\VisualMagick\configure and build it in Release mode. The .sln file outputs configure.exe. Then, run the .exe file. Same as the above way, Visual Studio .sln file is generated in DIR_ROOT\VisualMagick.

2.2. Compile
Now, you have one of the following .sln files
– VisualDynamicMT.sln, ifDynamic Multi-threaded DLL runtimes
– VisualStaticST.sln, if Static Single-threaded runtimes
– VisualStaticMT.sln, if Static Multi-threaded runtimes
– VisualStaticMTDLL.sln, if Static Multi-threaded DLL runtimes
Open the .sln file and build the .sln file in desired configuration (Debug, Release, or both Debug and Release).
1. Right click on the All project and select Set As Active Project
2. Select “Build=>Clean Solution”
3. Select “Build=>Build Solution”

After the compilation, important files are located in the following directories.
– DIR_ROOT\ViauslMagick\bin: .exe, .dll, .imc, and .xml files
– DIR_ROOT\VisualMagick\lib: .lib files
– DIR_ROOT\magick: .h files
– DIR_ROOT\Magick++\lib: .h files
– DIR_ROOT\wand: .h files

2.3. Make own code with Magick++
Same as any libraries,
– Include necessary .h files.
– Specify necessary .lib files.
– Set a path to a directory in which .dll files are located.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s