<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to DevelopmentEnvironment</title><link>https://sourceforge.net/p/bric1936/wiki/DevelopmentEnvironment/</link><description>Recent changes to DevelopmentEnvironment</description><atom:link href="https://sourceforge.net/p/bric1936/wiki/DevelopmentEnvironment/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 10 Apr 2013 10:46:14 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/bric1936/wiki/DevelopmentEnvironment/feed" rel="self" type="application/rss+xml"/><item><title>DevelopmentEnvironment modified by Mike Jackson</title><link>https://sourceforge.net/p/bric1936/wiki/DevelopmentEnvironment/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="how-to-set-up-your-development-environment"&gt;How to set up your development environment&lt;/h1&gt;
&lt;p&gt;These instructions have been tested on Windows XP (service pack 3) and Windows 7 Enterprise (6.1).&lt;/p&gt;
&lt;h2 id="tool-set"&gt;Tool set&lt;/h2&gt;
&lt;p&gt;The ALE tool set, and their licences, is as follows. None of these preclude open or closed source development.&lt;/p&gt;
&lt;p&gt;We describe what you need to actually download shortly.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Microsoft Visual Studio Professional or Visual C++ Express (free)&lt;/li&gt;
&lt;li&gt;CMake - build tool needed for VTK.&lt;ul&gt;
&lt;li&gt;BSD-style licence - &lt;a href="http://www.cmake.org/cmake/project/license.html"&gt;http://www.cmake.org/cmake/project/license.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;No CMake classes are used in ALE executables.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;VTK - visualisation toolkit. &lt;ul&gt;
&lt;li&gt;BSD licence - &lt;a href="http://www.vtk.org/VTK/project/license.html"&gt;http://www.vtk.org/VTK/project/license.html&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;OpenGL - This is needed for certain GUIs (including VTK ones) on Windows (See, for example, the &lt;a class="" href="http://www.vtk.org/Wiki/VTK_FAQ#How_do_I_build_the_examples_on_the_PC_running_Windows.3F"&gt;VTK FAQ&lt;/a&gt;)&lt;ul&gt;
&lt;li&gt;See README.TXT in ftp://ftp.microsoft.com/softlib/mslfiles/Opengl95.exe &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;OpenGL(R) 1.1 Release for Windows(R) 95, "The OpenGL runtime libraries for Windows 95 are not bundled with the Windows 95 operating system currently, but application developers may freely redistribute from this SDK along with their applications to other Windows 95 systems." &lt;/li&gt;
&lt;li&gt;wxWidgets - widget toolkit. A set of widget classes that make building GUIs far easier. &lt;ul&gt;
&lt;li&gt;L-GPL with exclusion - &lt;a href="http://www.wxwidgets.org/about/newlicen.htm"&gt;http://www.wxwidgets.org/about/newlicen.htm&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;"The wxWindows Licence is essentially the L-GPL (Library General Public Licence), with an exception stating that derived works in binary form may be distributed on the user's own terms. This is a solution that satisfies those who wish to produce GPL'ed software using wxWidgets, and also those producing proprietary software." &lt;/li&gt;
&lt;li&gt;In the download README - "If you use TIFF image handler, please see src/tiff/COPYRIGHT for libtiff licence details ... If you use JPEG image handler, documentation for your program should contain following sentence: "This software is based in part on the work of the Independent JPEG Group". See src/jpeg/README for details." We don't use these specific features.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;vtkRenderWindowInteractor - class to allow VTK windows in wxWidgets GUIs. &lt;ul&gt;
&lt;li&gt;Custom licence link cited in source code. Analogous to VTK BSD licence - &lt;a href="http://www.kitware.com/Copyright.htm"&gt;http://www.kitware.com/Copyright.htm&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Wu's color quantization C code - C code for doing minimum variance quantization of images. &lt;ul&gt;
&lt;li&gt;Wu's color quantization C code. This is free to download and use and has been used in open source and commercial (e.g. MATLAB) products. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;JPEG library - a library to load/save JPEGs. This is optional. One project in the ALE solution uses this library as a test harness for Wu's color quantization C code. It is ''not'' needed to compile and run ALE. &lt;ul&gt;
&lt;li&gt;Custom licence - &lt;a href="http://www.ijg.org/files/README"&gt;http://www.ijg.org/files/README&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;"We are releasing this software for both noncommercial and commercial use. Companies are welcome to use it as the basis for JPEG-related products. We do not ask a royalty, although we do ask for an acknowledgement in product literature (see the README file in the distribution for details)."&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;niftilib - library for loading/saving Nifti and Analyze files.&lt;ul&gt;
&lt;li&gt;Public domain.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;ParaView - graphics toolkit. We use files to support loading/saving Nifti/Analyze files via VTK classes.&lt;ul&gt;
&lt;li&gt;VTK BSD licence - &lt;a href="http://www.kitware.com/Copyright.htm"&gt;http://www.kitware.com/Copyright.htm&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="download-the-tool-set"&gt;Download the tool set&lt;/h2&gt;
&lt;p&gt;Download and install Microsoft Visual Studio or the, free, Microsoft Visual C++ Express:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We have used Microsoft Visual C++ Express 2010, Microsoft Visual Studio 2010 Professional (10.0.30319.1 RTMRel).&lt;/li&gt;
&lt;li&gt;Microsoft Visual C++ Express can be freely downloaded from &lt;a href="http://www.microsoft.com/express/Downloads."&gt;http://www.microsoft.com/express/Downloads.&lt;/a&gt; It  needs to be freely registered within 30 days. See &lt;a class="" href="RegisterVisualStudio"&gt;How to register Microsoft Visual C++ Express&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In what follows we refer to Visual C++ to mean either Visual C++ Express or Visual Studio.&lt;/p&gt;
&lt;p&gt;Download and install the CMake build tool: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download from &lt;a href="http://www.cmake.org."&gt;http://www.cmake.org.&lt;/a&gt; We used version 2.8 at &lt;a href="http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe"&gt;http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Follow the installer instructions &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Download VTK: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download from &lt;a href="http://www.vtk.org/VTK/resources/software.html#latest."&gt;http://www.vtk.org/VTK/resources/software.html#latest.&lt;/a&gt; We used VTK 5.6.0 at &lt;a href="http://www.vtk.org/files/release/5.6/vtk-5.6.0.zip"&gt;http://www.vtk.org/files/release/5.6/vtk-5.6.0.zip&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Download OpenGL: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you have Windows XP,&lt;ul&gt;
&lt;li&gt;Download from ftp://ftp.microsoft.com/softlib/mslfiles/Opengl95.exe. &lt;/li&gt;
&lt;li&gt;This creates a directory with the required DLLs and libraries. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If you have Windows 7 then the libraries should be in &lt;code&gt;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Download wxWidgets: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download from &lt;a href="http://www.wxwidgets.org/downloads/#latest_stable."&gt;http://www.wxwidgets.org/downloads/#latest_stable.&lt;/a&gt; We used wxWidgets 2.8.11's wxMSW installer for Windows at &lt;a href="http://sourceforge.net/projects/wxwindows/files/2.8.11/wxMSW-2.8.11-Setup.exe/download."&gt;http://sourceforge.net/projects/wxwindows/files/2.8.11/wxMSW-2.8.11-Setup.exe/download.&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Double-click on the exe (wxMSW-2.8.11-Setup.exe) to unZIP the source. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(Optional) Download JPEG library: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Visit &lt;a href="http://www.ece.sunysb.edu/~cvl/e358/f2001/jpeg-windows.html"&gt;http://www.ece.sunysb.edu/~cvl/e358/f2001/jpeg-windows.html&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Download all the files: &lt;code&gt;jconfig.h, jmorecfg.h, jpeglib.h, jpeg.lib, jpeg2jpeg.c, testimg.jpg&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;Put these in a directory on your PC e.g. &lt;code&gt;C:\jpeglib&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;If the above files are not at the URL then the source can be downloaded at &lt;a href="http://www.ijg.org."&gt;http://www.ijg.org.&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What about vtkRenderWindowInteractor, Wu's color quantization C code, niftilib and ParaView?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We have copies of these so there's '''no''' need to download them.&lt;/li&gt;
&lt;li&gt;Their locations in SVN and where they come from are listed in SVN at: &lt;code&gt;ale/cpp/trunk/README.txt&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="build-vtk"&gt;Build VTK&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run CMake. &lt;/li&gt;
&lt;li&gt;In Where is the source code field, enter VTK source directory that you have downloaded and unZIPped e.g. &lt;code&gt;C:/vtk-5.6-src&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;In Where to build the binaries field, enter a directory where you want the VTK binaries to go e.g. &lt;code&gt;C:/vtk-5.6-bin&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Using the +Add Entry button enter the following flags with the following values. &lt;ul&gt;
&lt;li&gt;Make sure that for each the Type is set to STRING. &lt;/li&gt;
&lt;li&gt;Do '''not''' use BOOL for the ON/OFF flags as it will not work.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;VTK_WRAP_JAVA&lt;/td&gt;
&lt;td&gt;OFF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VTK_WRAP_TCL&lt;/td&gt;
&lt;td&gt;OFF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VTK_WRAP_PYTHON&lt;/td&gt;
&lt;td&gt;OFF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VTK_USE_RENDERING&lt;/td&gt;
&lt;td&gt;ON&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VTK_PARALLEL&lt;/td&gt;
&lt;td&gt;OFF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_INSTALL_PREFIX&lt;/td&gt;
&lt;td&gt;Enter a directory in which you want the built VTK files to go e.g. &lt;code&gt;C:/vtk-5.6-mt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_BACKWARDS_COMPATIBILITY&lt;/td&gt;
&lt;td&gt;2.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BUILD_SHARED_LIBS&lt;/td&gt;
&lt;td&gt;OFF. Note, if ON then shared libraries are built. This means references to symbols placed in executables and removes duplication. If OFF then static libraries are built. Required symbols are copied from libraries to executables allowing them to be stand-alone. We use the OFF, static libraries, option.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BUILD_EXAMPLES&lt;/td&gt;
&lt;td&gt;OFF&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;Now, again using the +Add Entry button, enter the following flags with the following values. These are required to enable the building of static libraries and so stand-alone EXE applications using VTK: &lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_CXX_FLAGS_DEBUG&lt;/td&gt;
&lt;td&gt;/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_CXX_FLAGS_MINSIZEREL&lt;/td&gt;
&lt;td&gt;/MT /O1 /Ob1 /D NDEBUG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_CXX_FLAGS_RELEASE&lt;/td&gt;
&lt;td&gt;/MT /O2 /Ob2 /D NDEBUG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_CXX_FLAGS_RELWITHDEBINFO&lt;/td&gt;
&lt;td&gt;/MT /Zi /O2 /Ob1 /D NDEBUG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_C_FLAGS_DEBUG&lt;/td&gt;
&lt;td&gt;/D_DEBUG /MTd /Zi  /Ob0 /Od /RTC1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_C_FLAGS_MINSIZEREL&lt;/td&gt;
&lt;td&gt;/MT /O1 /Ob1 /D NDEBUG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_C_FLAGS_RELEASE&lt;/td&gt;
&lt;td&gt;/MT /O2 /Ob2 /D NDEBUG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CMAKE_C_FLAGS_RELWITHDEBINFO&lt;/td&gt;
&lt;td&gt;/MT /Zi /O2 /Ob1 /D NDEBUG&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;Click Configure &lt;/li&gt;
&lt;li&gt;Select the build system:&lt;ul&gt;
&lt;li&gt;If using Visual Studio 2010 or Visual C++ Express 2010 then select "Visual Studio 10"&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Wait for Configuration to complete - this may take several minutes&lt;/li&gt;
&lt;li&gt;Check that BUILD_SHARED_LIBS is still OFF. If not then set it to off and re-click Configure&lt;/li&gt;
&lt;li&gt;Click Configure '''again''' &lt;/li&gt;
&lt;li&gt;Click Generate&lt;/li&gt;
&lt;li&gt;Eventually this will create a project file in &lt;code&gt;C:\vtk-5.6-bin\VTk.sln&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Double-click this and Visual C++ should open &lt;/li&gt;
&lt;li&gt;Set the build mode to Release using the drop-down menu at the top of the page, next to the green arrow icon &lt;/li&gt;
&lt;li&gt;In the Solution Explorer on the left hand side, right click on ALL BUILD and select Build &lt;/li&gt;
&lt;li&gt;Wait for '''a long time''' (&amp;gt; 1 hour) for it to build. There should be 0 errors. &lt;/li&gt;
&lt;li&gt;Set the build mode to Release using the drop-down menu at the top of the page &lt;/li&gt;
&lt;li&gt;In the Solution Explorer on the left hand side, right click on INSTALL and select Build &lt;/li&gt;
&lt;li&gt;Wait for '''a long time''' for it to build. There should be 0 errors. &lt;/li&gt;
&lt;li&gt;Look in &lt;code&gt;C:\vtk-5.6\bin&lt;/code&gt; and you should see bin, include and lib directories &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="build-wxwidgets"&gt;Build wxWidgets&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;When you double-click on the wxWidgets exe (wxMSW-2.8.11-Setup.exe) you'll end up with two Visual C++ workspaces: &lt;ul&gt;
&lt;li&gt;&lt;code&gt;build\msw\wx.dsw&lt;/code&gt; for static libraries. &lt;/li&gt;
&lt;li&gt;&lt;code&gt;build\msw\wx_dll.dsw&lt;/code&gt; for dynamic libraries. &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;We use static libraries so open &lt;code&gt;build/msw/wx.dsw&lt;/code&gt; in Visual C++. &lt;/li&gt;
&lt;li&gt;You may be asked if you want to convert from Visual Studio 2006. If so then click Yes to All. &lt;ul&gt;
&lt;li&gt;This works for Visual Studio 2010.&lt;/li&gt;
&lt;li&gt;This does not work for Visual C++ Express 2010. You can use Visual C++ Express 2008 to convert the file. Just load it in, click Yes to All then exit and load up the converted solution file in Visual C++ Express 2010.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You will see a solution with a list of projects. &lt;/li&gt;
&lt;li&gt;Each project comes with a number of options e.g. Debug or Release modes, ANSI or Unicode character sets, Static or Dynamic linking. &lt;/li&gt;
&lt;li&gt;We use Unicode character sets, static linking and Release mode so: &lt;ul&gt;
&lt;li&gt;Select Unicode Release ('''not''' Universal Unicode Release) from the drop-down menu by the green arrow icon. &lt;/li&gt;
&lt;li&gt;We want static linking so, you will need to set the runtime library flag for '''every''' project: &lt;ul&gt;
&lt;li&gt;Right-click the project name in the Solution Explorer &lt;/li&gt;
&lt;li&gt;Make sure Unicode Release is selected from the drop-down menu by the green arrow icon &lt;/li&gt;
&lt;li&gt;Click Configuration Properties &lt;/li&gt;
&lt;li&gt;Click C/C++ &lt;/li&gt;
&lt;li&gt;Click Code Generation &lt;/li&gt;
&lt;li&gt;For property Runtime Library, change it from /MD to /MT &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;''Make sure you do this for every project''&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Now, compile each project in the following order (you can try to build the whole solution but it may not get the compilation order right): &lt;ul&gt;
&lt;li&gt;wxjpeg, wxpng, wxtiff, wxzlib &lt;/li&gt;
&lt;li&gt;wxregex, wxexpat, base, net &lt;/li&gt;
&lt;li&gt;odbc, core, gl, html, xml &lt;/li&gt;
&lt;li&gt;media, qa, adv, dbgrid, xrc, aui, richtext &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Assuming you unZIPped wxWidgets to &lt;code&gt;C:\wxWidgets-2.8.11&lt;/code&gt;, the libraries will be placed in &lt;code&gt;C:\wxWidgets-2.8.11\lib\vc_lib&lt;/code&gt;. &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="set-environment-variables"&gt;Set environment variables&lt;/h2&gt;
&lt;p&gt;To help portability, our Microsoft Visual C++ project file does not have hard-coded paths but instead relies on environment variables to make it more portable. &lt;/p&gt;
&lt;p&gt;You can set environment variables by selecting Start =&amp;gt; Control Panel, then double-clicking System, selecting the Advanced tab, clicking the Environment Variables button, and using the New button in the User variables area.&lt;/p&gt;
&lt;p&gt;Set the following variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;OPENGLDIR&lt;/code&gt; - path to the OpenGL directory, e.g. &lt;code&gt;C:\OpenGL&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;WXWIDGETSDIR&lt;/code&gt; - path to the wxWidgets directory built above, e.g. &lt;code&gt;C:\wxWidgets-2.8.11&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;VTKDIR&lt;/code&gt; - path to the VTK directory built above, e.g. &lt;code&gt;C:\vtk-5.6-mt&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;VTKINCLUDEDIR&lt;/code&gt; - relative path to the VTK include files in the above e.g. &lt;code&gt;%VTKDIR%\include\vtk-5.6&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;VTKLIBDIR&lt;/code&gt; - relative path to the VTK library files in the above, e.g. &lt;code&gt;%VTKDIR%\lib\vtk-5.6&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;JPEGLIBDIR&lt;/code&gt; - path the JPEG library, (this is optional, see above) e.g. &lt;code&gt;C:\jpeglib&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="debug-versions"&gt;Debug versions&lt;/h2&gt;
&lt;p&gt;The above instructions build Release versions of libraries and applications i.e. those with the /MT flag enabled. To build Debug versions, with the /MTd flag enabled, which, when used with the Visual C++ debugger provide information on memory leaks and other useful information you can follow the above instructions with the following changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VTK:&lt;ul&gt;
&lt;li&gt;When building the ALL BUILD and INSTALL projects in Visual C++, ensure the build configuration is set to Debug, not Release.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;wxWidgets. &lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;wxMSW-2.8.11-Setup.exe&lt;/code&gt; and deploy to a new directory e.g. &lt;code&gt;C:\wxWidgets-2.8.11-mtd&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Set the runtime library flag for each project to /MTd, and not /MT.&lt;/li&gt;
&lt;li&gt;Make sure Unicode Debug is selected from the drop-down menu by the green arrow icon &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Set environment variables:&lt;ul&gt;
&lt;li&gt;&lt;code&gt;WXWIDGETSMTDDIR&lt;/code&gt; - path to the wxWidgets directory built above, e.g. &lt;code&gt;C:\wxWidgets-2.8.11-mtd&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;VTKMTDDIR&lt;/code&gt; - path to the VTK directory built above, e.g. &lt;code&gt;C:\vtk-5.6-mtd&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;VTKMTDINCLUDEDIR&lt;/code&gt; - relative path to the VTK include files in the above e.g. &lt;code&gt;%VTKDIR%\include\vtk-5.6&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;VTKMTDLIBDIR&lt;/code&gt; - relative path to the VTK library files in the above, e.g. &lt;code&gt;%VTKDIR%\lib\vtk-5.6&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;p&gt;VTK build instructions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://code.hkpeterpeter.googlepages.com/vtk_build_vc.pdf"&gt;http://code.hkpeterpeter.googlepages.com/vtk_build_vc.pdf&lt;/a&gt; linked from&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vtkblog.blogspot.com/2007/04/install-build-vtk-from-source-in-visual.html."&gt;http://vtkblog.blogspot.com/2007/04/install-build-vtk-from-source-in-visual.html.&lt;/a&gt; Some errors in the text were corrected. &lt;/li&gt;
&lt;li&gt;The recommendation to use /MT for static libraries with VTK in &lt;a href="http://www.vtk.org/Wiki/User_talk:Sylvain#Build_VTK_for_Release."&gt;http://www.vtk.org/Wiki/User_talk:Sylvain#Build_VTK_for_Release.&lt;/a&gt; The flag values cited above are the C/C++ flags in the C:\vtk-5.6-bin\CMakeCache.txt CMake file in a default VTK build with MD replaced by MT. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;wxWidgets build instructions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://wiki.wxwidgets.org/Downloading_and_installing_wxWidgets"&gt;http://wiki.wxwidgets.org/Downloading_and_installing_wxWidgets&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide"&gt;http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mike Jackson</dc:creator><pubDate>Wed, 10 Apr 2013 10:46:14 -0000</pubDate><guid>https://sourceforge.net59d87a1c49d2a4782ba58a543617d4986f4b088d</guid></item></channel></rss>