Home | History | Annotate | Download | only in www
      1 
      2 
      3 
      4 
      5 <!DOCTYPE html>
      6 <html lang="en">
      7 <head>
      8     <title>ImageMagick: Advanced Windows Source Installation</title>
      9   <meta charset="utf-8" />
     10   <meta http-equiv="X-UA-Compatible" content="IE=edge" />
     11   <meta name="viewport" content="width=device-width, initial-scale=1" />
     12   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
     13   <meta name="application-name" content="ImageMagick"/>
     14   <meta name="description" content="ImageMagick is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bzier curves."/>
     15   <meta name="application-url" content="http://www.imagemagick.org"/>
     16   <meta name="generator" content="PHP"/>
     17   <meta name="keywords" content="advanced, windows, source, installation, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
     18   <meta name="rating" content="GENERAL"/>
     19   <meta name="robots" content="INDEX, FOLLOW"/>
     20   <meta name="generator" content="ImageMagick Studio LLC"/>
     21   <meta name="author" content="ImageMagick Studio LLC"/>
     22   <meta name="revisit-after" content="2 DAYS"/>
     23   <meta name="resource-type" content="document"/>
     24   <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/>
     25   <meta name="distribution" content="Global"/>
     26   <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
     27   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
     28   <link rel="icon" href="../images/wand.png"/>
     29   <link rel="shortcut icon" href="../images/wand.ico"/>
     30   <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700">
     31   <link rel="stylesheet" href="css/magick.css"/>
     32 </head>
     33 <body>
     34 <div class="main">
     35 <div class="magick-masthead">
     36   <div class="container">
     37     <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
     38          style="display:block"
     39          data-ad-client="ca-pub-3129977114552745"
     40          data-ad-slot="6345125851"
     41          data-ad-format="auto"></ins>
     42     <script>
     43       (adsbygoogle = window.adsbygoogle || []).push({});
     44     </script>
     45     <nav class="magick-nav">
     46       <a class="magick-nav-item " href="../index.html">Home</a>
     47       <a class="magick-nav-item " href="binary-releases.html">Download</a>
     48       <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
     49       <a class="magick-nav-item " href="command-line-processing.html">Command-line</a>
     50       <a class="magick-nav-item " href="resources.html">Resources</a>
     51       <a class="magick-nav-item " href="api.html">Develop</a>
     52       <a class="magick-nav-item " href="http://www.imagemagick.org/script/search.php">Search</a>
     53       <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
     54     </nav>
     55   </div>
     56 </div>
     57 <div class="container">
     58 <div class="magick-header">
     59 <p class="text-center"><a href="advanced-windows-installation.html#download">Download &amp; Unpack</a>  <a href="advanced-windows-installation.html#configure">Configure</a>   <a href="advanced-windows-installation.html#build">Build</a>  <a href="advanced-windows-installation.html#install">Install</a>  <a href="advanced-windows-installation.html#binary">Create a Self-installing Binary Distribution</a>  <a href="advanced-windows-installation.html#problems">Dealing with Unexpected Problems</a>  <a href="advanced-windows-installation.html#project">Building Your Custom Project</a></p>
     60 
     61 <p  class="lead magick-description">It's possible you don't want to concern yourself with advanced installation under Windows.  If so, you also have the option of installing a self-installing <a href="binary-releases.html#windows">binary release</a> or if you still want to install from source without all the fuss see the simple <a href="install-source.html#windows">Install From Source</a> instructions.  However, if you want to customize the configuration and installation of ImageMagick under Windows, lets begin.</p>
     62 
     63 <h2 class="magick-header"><a id="download"></a>Download &amp; Unpack</h2>
     64 
     65 <p>Building ImageMagick source for Windows requires a modern version of Microsoft Visual Studio IDE.  Users have reported success with the Borland C++ compiler as well.  If you don't have a compiler you can still install a self-installing <a href="binary-releases.html#windows">binary release</a>.</p>
     66 
     67 <p>Download <a href="http://www.imagemagick.org/download/windows/ImageMagick-windows.zip">ImageMagick-windows.zip</a> from <a href="http://www.imagemagick.org/download/windows">ftp.imagemagick.org</a> or its <a href="download.html">mirrors</a> and verify the distribution against its <a href="http://www.imagemagick.org/download/windows/digest.rdf">message digest</a>.</p>
     68 
     69 <p>You can unpack the distribution with <a href="http://www.winzip.com">WinZip</a> or type the following from any Command Prompt window:</p>
     70 
     71 <pre>
     72 unzip ImageMagick-windows.zip
     73 </pre>
     74 
     75 <p>Now that you have the ImageMagick Windows source distribution unpacked, let's configure it.</p>
     76 
     77 
     78 <h2 class="magick-header"><a id="configure"></a>Configure</h2>
     79 
     80 <p>These instructions are specific to building ImageMagick with the <a href="http://msdn.microsoft.com/vstudio/">Visual Studio</a> under Windows XP, Win2K, or Windows 98.  ImageMagick does not include any workspace (DSW) or project files (DSP) except for those included with third party libraries. Instead, there is a <code>configure</code> program that must be built and run which creates the Visual Studio workspaces for ImageMagick.  The Visual Studio system provides four different types of <var>runtime</var> environments that must match across all application, library, and dynamic-library (DLL) code that is built. The <code>configure</code> program creates a set of build files that are consistent for a specific runtime selection listed here:</p>
     81 
     82 <ol>
     83   <li>Dynamic Multi-threaded DLL runtimes (VisualDynamicMT).</li>
     84   <li>Static Single-threaded runtimes (VisualStaticST).</li>
     85 	<li>Static Multi-threaded runtimes (VisualStaticMT).</li>
     86 	<li>Static Multi-threaded DLL runtimes (VisualStaticMTDLL).</li>
     87 </ol>
     88 
     89 <p>In addition to these runtimes, the VisualMagick build environment allows you to select whether to include the X11 libraries in the build or not.  X11 DLLs and headers are provided with the VisualMagick build environment.  Most Windows users are probably not interested in using X11, so you might prefer to build without X11 support.  Since the <code>animate</code>, <code>display</code>, and <code>import</code> program depends on the X11 delegate libraries, these programs will no work if you choose not to include X11 support.</p>
     90 
     91 <p>This leads to five different possible build options. The default binary distribution is built using the Dynamic Multi-threaded DLL (VisualDynamicMT) option with the X11 libraries included.  This results in an X11 compatible build using all DLL's for everything and multi-threaded support (the only option for DLL's).</p>
     92 
     93 <p>To create a workspace for your requirements, simply go to the <code>VisualMagick\configure</code> folder and open the <code>configure.dsw</code> workspace (for Visual Studio 6) or <code>configure.sln</code> (for Visual Studio 7 or 8). Set the build configuration to <var>Release</var>.</p>
     94 
     95 <p>Build and execute the configure program and follow the on-screen instructions.  You should not change any of the defaults unless you have a specific reason to do so.</p>
     96 
     97 <p>The configure program has a button entitled:</p>
     98 
     99 <p>
    100   Edit "magick_config.h"
    101 </p>
    102 
    103 <p>Click on this button to bring up <code>magick-config.h</code> in Windows Notepad.  Review and optionally change any preprocessor defines in ImageMagick's <code>magick_config.h</code> file to suit your needs.  This file is copied to <code>magick\magick_config.h</code>.  You may safely open <code>magick\magick_config.h</code>, modify it, and recompile without re-running the configure program. In fact, using Notepad to edit the copied file may be preferable since it preserves the original <code>magick_config.h</code> file.</p>
    104 
    105 <p>Key user defines in <code>magick_config.h</code> include:</p>
    106 
    107 <div class="table-responsive">
    108 <table class="table table-condensed table-striped">
    109   <tr>
    110     <td>MAGICKCORE_QUANTUM_DEPTH (default 16)</td>
    111     <td>Specify the depth of the pixel component depth (8, 16, or 32).  A value of 8 uses half the memory than 16 and may run 30% faster, but provides 256 times less color resolution than a value of 16.  We recommend a quantum depth of 16 because 16-bit images are becoming more prevalent on the Internet.</td>
    112   </tr>
    113   <tr>
    114     <td>MAGICKCORE_INSTALLED_SUPPORT (default undefined)</td>
    115     <td>Define to build a ImageMagick which uses registry settings or embedded paths to locate installed components (coder modules and configuration files). The default is to look for all files in the same directory as the executable.  You will wand to define this value if you intend on <a href="advanced-windows-installation.html#install">installing</a> ImageMagick on your system.</td>
    116   </tr>
    117   <tr>
    118     <td>ProvideDllMain (default defined)</td>
    119     <td>Define to include a DllMain() function ensures that the ImageMagick DLL is properly initialized without participation from dependent applications. This avoids the requirement to invoke InitializeMagick() from dependent applications is only useful for DLL builds.</td>
    120   </tr>
    121 </table></div>
    122 
    123 <p>ImageMagick is now configured and ready to build.</p>
    124 
    125 <p>The default build is WIN32.  For 64-bit, open a newly created solution and enter Configuration Manager. Add a x64 configuration, copying the configuration from Win32. Be sure  that it adds the configuration to all the projects.  Now compile.  For the 64-bit build, you will also need to disable X11 support.  Edit magick-config.h and undefine the MAGICKCORE_X11_DELEGATE define.</p>
    126 
    127 <h2 class="magick-header"><a id="Build"></a>Build</h2>
    128 
    129 <p>After creating your build environment, proceed to open the DSW (or SLN) workspace in the <code>VisualMagick</code> folder.  In the DSW file choose the <var>All</var> project to make it the <var>active</var> project.  Set the build configuration to the desired one (Debug, or Release) and <var>clean</var> and <var>build:</var></p>
    130 
    131 <ol>
    132   <li>Right click on the All project and select <var>Set As Active Project</var></li>
    133   <li>Select "Build=>Clean Solution"</li>
    134 	<li>Select "Build=>Build Solution"</li>
    135 </ol>
    136 
    137 <p>The <var>clean</var> step is necessary in order to make sure that all of the target support libraries are updated with any patches needed to get them to compile properly under Visual Studio.</p>
    138 
    139 <p>After a successful build, all of the required files that are needed to run any of the <a href="command-line-tools.html">command line tools</a> are located in the <code>VisualMagick\bin</code> folder.  This includes EXE, DLL libraries, and ImageMagick configuration files.  You should be able to test the build directly from this directory without having to move anything to any of the global SYSTEM or SYSTEM32 areas in the operating system installation.</p>
    140 
    141 <p>The Visual Studio distribution of ImageMagick comes with the Magick++ C++ wrapper by default. This add-on layer has a large number of demo and test files that can be found in <code>ImageMagick\Magick++\demo</code>, and <code>ImageMagick\Magick++\tests</code>. There are also a variety of tests that use the straight C API as well in ImageMagick\tests.</p>
    142 
    143 <p> All of these programs are <var>not</var> configured to be built in the default workspace created by the configure program. You can cause all of these demos and test programs to be built by checking the box in configure that says:</p>
    144 
    145 <p>
    146   Include all demo and test programs
    147 </p>
    148 
    149 <p>In addition, there is another related checkbox (checked by default) that causes all generated project files to be created standalone so that they can be copied to other areas of you system.</p>
    150 
    151 <p>This the checkbox:</p>
    152 
    153 <p>
    154   Generate all utility projects with full paths rather then relative paths.
    155 </p>
    156 
    157 <p>Visual Studio uses a concept of <var>dependencies</var> that tell it what other components need to be build when a particular project is being build. This mechanism is also used to ensure that components link properly. In my normal development environment, I want to be able to make changes and debug the system as a whole, so I like and NEED to use dependencies. However, most end users don't want to work this way.</p>
    158 
    159 <p>Instead they really just want to build the package and then get down to business working on their application. The solution is to make all the utility projects (UTIL_xxxx_yy_exe.dsp) use full absolute paths to all the things they need. This way the projects stand on their own and can actually be copied and used as templates to get a particular custom application compiling with little effort.</p>
    160 
    161 <p>With this feature enabled, you should be able to nab a copy of</p>
    162 
    163 <pre>
    164 VisualMagick\utilities\UTIL_convert_xxx_exe.dsp  (for C) or
    165 VisualMagick\Magick++\demo\UTIL_demo_xxx_exe.dsp (for C++)
    166 </pre>
    167 
    168 <p>and pop it into Notepad, modify it (carefully) to your needs and be on your way to happy compiling and linking.</p>
    169 
    170 <p> You can feel free to pick any of the standard utilities, tests, or demo programs as the basis for a new program by copying the project and the source and hacking away.</p>
    171 
    172 <p>The choice of what to use as a starting point is very easy.</p>
    173 
    174 <p>For straight C API command line applications use something from:</p>
    175 
    176 <pre>
    177 ImageMagick\tests or
    178 ImageMagick\utilities (source code) or
    179 ImageMagick\VisualMagick\tests or
    180 ImageMagick\Visualmagick\utilities (project - DSP)
    181 </pre>
    182 
    183 <p>For C++ and Magick++ command line applications use something from:</p>
    184 
    185 <pre>
    186 ImageMagick\Magick++\tests or ImageMagick\Magick++\demo (source code) or
    187 ImageMagick\VisualMagick\Magick++\tests or  <br/>
    188 ImageMagick\VisualMagick\Magick++\demo (project - DSP)
    189 </pre>
    190 
    191 <p>For C++ and Magick++ and MFC windows applications use:</p>
    192 
    193 <pre>
    194 ImageMagick\contrib\win32\MFC\NtMagick (source code) or
    195 ImageMagick\VisualMagick\contrib\win32\MFC\NtMagick (project - DSP)
    196 </pre>
    197 
    198 <p>The ImageMagick distribution is very modular. The default configuration is there to get you rolling, but you need to make some serious choices when you wish to change things around.</p>
    199 
    200 <p>The default options are all targeted at having all the components in one place (e.g. the <code>bin</code> directory of the VisualMagick build tree). These components may be copied to another folder (such as to another computer).</p>
    201 
    202 <p>The folder containing the executables and DLLs should contain the following files:</p>
    203 
    204 <ol>
    205   <li>magic.xml</li>
    206   <li>delegates.xml</li>
    207   <li>modules.xml</li>
    208   <li>colors.xml</li>
    209 </ol>
    210 
    211 <p>among others.</p>
    212 
    213 <p>The <code>bin</code> folder should contains all EXE's and DLL's as well as the very important <code>modules.xml</code> file.</p>
    214 
    215 <p>With this default setup, you can use any of the command line tools and run scripts as normal. You can actually get by quite nicely this way by doing something like <code>pushd e:\xxx\yyy\bin</code> in any scripts you write to execute <var>out of</var> this directory.</p>
    216 
    217 <p>By default the core of ImageMagick on Win32 always looks in the place were the exe program is run from in order to find all of the files as well as the DLL's it needs.</p>
    218 
    219 	<h3>ENVIRONMENT VARIABLES</h3>
    220 
    221 		<p>You can use the <var>System</var> control panel to allow you to add and delete what is in any of the environment variables. You can even have user specific environment variables if you wish.</p>
    222 
    223 		<h4>PATH</h4>
    224 		  <p>This environmental variable sets the default list of places were Windows looks for EXE's and DLL's. Windows CMD shell seems to look in the <var>current</var> directory first no matter what, which may make it unnecessary to update the PATH. If you wish to run any of utilities from another location then you must add the path to your <code>bin</code> directory in. For instance, to do this for the default build environment like I do, you might add:</p>
    225 
    226 
    227 <pre>
    228 C:\ImageMagick\VisualMagick\bin
    229 </pre>
    230 
    231 		<h4>MAGICK_HOME</h4>
    232 		  <p>If all you do is modify the PATH variable, the first problem you will run into is that ImageMagick may not be able to find any of its <var>modules</var>. Modules are all the IM_MOD*.DLL files you see in the distribution. There is one of these for each and every file format that ImageMagick supports. This environment variable tells the system were to look for these DLL's. The compiled in <var>default</var> is <var>execution path</var> - which says - look in the same place that the application is running <var>in</var>. If you are running from somewhere other then <code>bin</code> - this will no longer work and you must use this variable. If you elect to leave the modules in the same place as the EXE's (a good idea) then you can simply set this to the same place as you did the PATH variable. In my case:</p>
    233 
    234 <pre>
    235 C:\ImageMagick\coders
    236 </pre>
    237 
    238 			<p>This also the place were ImageMagick expects to find the <code>colors.xml</code>, <code>delegates.xml</code>, <code>magic.xml</code>, <code>modules.xml</code>, and <code>type.xml</code> files.</p>
    239 
    240 <p>One cool thing about the modules build of ImageMagick is that you can now leave out file formats and lighten you load. If all you ever need is GIF and JPEG, then simply drop all the other DLL's into the local trash can and get on with your life.</p>
    241 
    242 <p>Always keep the XC format, since ImageMagick uses it internally.</p>
    243 
    244 <p>You can elect to changes these things the good old <var>hard-coded</var> way. This define is applicable in <code>magick-config.h</code>:</p>
    245 
    246 <pre>
    247 #define MagickConfigurePath  "C:\\ImageMagick\\"
    248 </pre>
    249 
    250 <p>To view any image in a Microsoft window, type</p>
    251 
    252 <pre>
    253 magick image.ext win:
    254 </pre>
    255 
    256 <p>Make sure <a href="http://www.cs.wisc.edu/~ghost/">Ghostscript</a> is installed, otherwise, you will be unable to convert or view a Postscript document, and Postscript standard fonts will not be available.</p>
    257 
    258 <p>You may use any standard web browser (e.g. Internet Explorer) to browse the ImageMagick documentation.</p>
    259 
    260 <p>The Win2K executables will work under Windows 98.</p>
    261 
    262 <p>ImageMagick is now configured and built. You can optionally install it on your system as discussed below.</p>
    263 
    264 <p>If you are looking to install the ImageMagick COM+ object, see <a href="ImageMagickObject.html">Installing the ImageMagickObject COM+ Component</a>.</p>
    265 
    266 <h2 class="magick-header"><a id="Install"></a>Install</h2>
    267 
    268 <p>You can run ImageMagick command line utilities directly from the <code>VisualMagick\bin</code> folder, however, in most cases you may want the convenience of an installer script.  ImageMagick provides <a href="http://www.jrsoftware.org">Inno Setup</a> scripts for this purpose.  Note, you must define MAGICKCORE_INSTALLED_SUPPORT at <a href="advanced-windows-installation.html#configure">configure</a> time to utilize the installer scripts.</p>
    269 
    270 <p>To get started building a self-installing ImageMagick executable, go to <code>VisualMagick\installer</code> folder and click on a script that matches your build environment.  Press F9 to build and install ImageMagick.  The default location is <code>C:Program Files\ImageMagick-6.?.?\Q?</code>.  The exact folder name depends on the ImageMagick version and quantum depth.  Once installed, ImageMagick command line utilities and libraries are available to the MS Command Prompt, web scripts, or to meet your development needs.</p>
    271 
    272 
    273 <h2 class="magick-header"><a id="binary"></a>Create a Self-Installing Binary Distribution</h2>
    274 
    275 <h3>Prerequisites</h3>
    276 
    277 	<ol>
    278 	<li>Download and install <a href="http://www.jrsoftware.org/isdl.html">Inno Setup 5</a>.</li>
    279 	<li>Download and install <a href="http://strawberryperl.com/">Strawberry Perl</a>.</li>
    280 	</ol>
    281 
    282 <h3>Run the Configure Wizard</h3>
    283 
    284 	<ol>
    285 	<li>Double-click on <code>VisualMagick/configure/configure.sln</code> to build the configure wizard.</li>
    286 	<li>Select <code>Rebuild All</code> and launch the configure wizard.</li>
    287 	<li>Uncheck <code>Use X11 Stubs</code> and check <code>Build demo and test programs</code>.</li>
    288 	<li>Click on <code>Edit magick_config.h</code> and define <code>MAGICKCORE_INSTALLED_SUPPORT</code>.</li>
    289 	<li>Complete the configure wizard screens to create the ImageMagick Visual C++ workspace.</li>
    290 	</ol>
    291 
    292 <h3>Build ImageMagick</h3>
    293 
    294 	<ol>
    295 	<li>Double-click on <code>VisualMagick/VisualDynamicMT.sln</code> to launch the ImageMagick Visual workspace.</li>
    296 	<li>Set the active configuration to <code>Win32 Release</code>.</li>
    297 	<li>Select <code>Rebuild All</code> to build the ImageMagick binary distribution.</li>
    298 	</ol>
    299 
    300 <h3>Build ImageMagickObject</h3>
    301 
    302 	<ol>
    303 	<li>Launch the Command Prompt application and move to the <code>contrib\win32\ATL7\ImageMagickObject</code> folder.</li>
    304 	<li>Build ImageMagickObject with these commands:
    305 <pre>
    306 BuildImageMagickObject clean
    307 BuildImageMagickObject release
    308 </pre></li>
    309 	</ol>
    310 
    311 <h3>Build PerlMagick</h3>
    312 
    313 	<ol>
    314 	<li>Launch the Command Prompt application and move to the <code>PerlMagick</code> folder.</li>
    315 	<li>Build PerlMagick with these commands:
    316 <pre>
    317 perl Makefile.PL
    318 dmake release
    319 </pre></li>
    320 	</ol>
    321 
    322 <h3>Create the Self-installing ImageMagick Binary Distribution</h3>
    323 
    324 	<ol>
    325 	<li>Double-click on <code>VisualMagick/installer/im-dll-16.iss</code> to launch the Inno Setup 5 wizard.</li>
    326 	<li>Select <code>File->Compile</code>.</li>
    327 	</ol>
    328 
    329 <h3>Install the Binary Distribution</h3>
    330 
    331 	<ol>
    332 	<li>Double-click on
    333 	<code>VisualMagick/bin/ImageMagick-7.0.2-0-Q16-windows-dll.exe</code>
    334 	to launch the ImageMagick binary distribution.</li>
    335 	<li>Complete the installer screens to install ImageMagick on your system.</li>
    336 	</ol>
    337 
    338 <h3>Test the Binary Distribution</h3>
    339 
    340 	<ol>
    341 	<li>Launch the Command Prompt application and move to the <code>PerlMagick</code> folder and type
    342 <pre>
    343 nmake test
    344 </pre></li>
    345 
    346 	<li>Move to the <code>VisualMagick/tests</code> folder and type
    347 <pre>
    348 validate
    349 </pre></li>
    350 	<li>Move to the <code>VisualMagick/Magick++/tests</code> folder and type
    351 <pre>
    352 run_tests.bat
    353 </pre></li>
    354 	<li>Move to the <code>VisualMagick/Magick++/demo</code> folder and type
    355 <pre>
    356 run_demos.bat
    357 </pre></li>
    358 	</ol>
    359 
    360 <p>If all the tests pass without complaint, the ImageMagick self-install binary distribution is ready for use.</p>
    361 
    362 <h2 class="magick-header"><a id="problems"></a>Dealing with Unexpected Problems</h2>
    363 
    364 <p>Chances are the download, configure, build, and install of ImageMagick went flawlessly as it is intended, however, certain systems and environments may cause one or more steps to fail.  We discuss a few problems we've run across and how to take corrective action to ensure you have a working release of ImageMagick.</p>
    365 
    366 <p>If the compiler generates an error or if it quits unexpectedly, go to the <a href="http://msdn.microsoft.com/vstudio/">Visual Studio</a> web site and look for Visual Studio service packs.  Chances are, after you download and install all the Visual Studio service packs, ImageMagick will compile and build as expected.</p>
    367 
    368 
    369 <h2 class="magick-header"><a id="project"></a>Building Your Custom Project</h2>
    370 
    371 <p>The Windows <a href="binary-releases.html#windows">binary</a> distribution includes a number of demo projects that you can use as a template for your own custom project.  For example, start with the Button project, generally located in the <code>c:/Program Files/ImageMagick-6.5.5-0/Magick++_demos</code> folder.  If not, be sure to select <code>Configuration Properties->C/C++->Preprocessor</code> and set these definitions:</p>
    372 
    373 <pre>
    374 NDEBUG
    375 WIN32
    376 _CONSOLE
    377 _VISUALC_
    378 NeedFunctionPrototypes
    379 _DLL
    380 _MAGICKMOD_
    381 </pre>
    382 
    383 </div>
    384   <footer class="magick-footer">
    385     <p><a href="support.html">Donate</a> 
    386      <a href="sitemap.html">Sitemap</a> 
    387     <a href="links.html">Related</a> 
    388     <a href="architecture.html">Architecture</a>
    389 </p>
    390     <p><a href="advanced-windows-installation.html#">Back to top</a> 
    391     <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 
    392     <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
    393         <p><small>  1999-2016 ImageMagick Studio LLC</small></p>
    394   </footer>
    395 </div><!-- /.container -->
    396 
    397   <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    398   <script src="../js/magick.html"></script>
    399 </div>
    400 </body>
    401 </html>
    402