Author: Jing
Li
Updated time:
Building VTK 4.x using VS .Net 2003 and Installing
it on Windows
Part One: How to build VTK binaries
Step 1. Download VTK-4.2-LatestRelease.zip from http://public.kitware.com/VTK/get-software.php to your harddisk, and uppack them to C:\VTK42 folder.
Step 2. Download VTKData-4.2.zip from http://public.kitware.com/VTK/get-software.php to your harddisk, and uppack them to C:\VTKData-4.2 folder in case that you want to build vtk examples.
Step 3. Create a folder C:\VTKBin to store the compiled binaries.
Step 4. Download CMSetup202.exe from http://www.cmake.org/HTML/Download.html and install it, which is a new cross platform build tool. You need it to build the VTK binaries from VTK source codes.
Step 5. Start CMake, provide the souce codes and binaries pathes and the compiler to CMake, then press Configure button to let CMake read the CMakeLists.txt from the souce path and configure the variables. Make sure turn on

If you want to build VTK examples, you can choose ture on BUILD_EXAMPLES. Then press OK to build the VTK solution, which is created in the C:\VTKBin42.
Step 6. Open the VTK.sln from C:\VTKBin42 using VS .Net 2003 and build it in Release mode. The building takes nearly one hour on a PC with Pentium 4 CPU 1.80GHz.
Part Two: How to Install VTK binaires on Windows PC
Step 1. Copy vtk*.dll files from C:\VTKBin42\bin\release to c:\windows\system32.


Step 3. To use VTK in your
project, vtk*.libs need
to be added to the project setting. Go to Project, open Properties
page, select Linker list, in the Input category, add vtk*.libs to the Additional Dependencies, which are vtkCommon.lib vtkFiltering.lib vtkGraphics.lib vtkHybrid.lib vtkImaging.lib vtkIO.lib vtkpng.lib vtkjpeg.lib vtkParallel.lib vtkRendering.lib
vtkzlib.lib (please note there is a space between each library
name)
In the notes, I describes how to build VTK 4.2 binaries using VS .Net 2003 and install it on winodws PC. You can build the lastest interim release VTK 4.4 using the same methods.
Reference: Rasmus Paulsen, Installing VTK 4.1.x on a windows PC. http://cosmolab.cineca.it/docs/jan10-2003/VTK%20upgrade/PCInstallationVTK4.0.pdf