BuildingVTKOnWin32

Building VTK with GL2PS on Windows with MSVC

You need to have MSVC installed. These notes are for MSVC 6.0. The instructions are long but pretty straight forward.

Also note that these instructions mostly apply to VTK 4.2.x. CVS versions of VTK do not require downloading GL2PS separately, since it has been incorporated into the VTK sources. If you are using VTK from CVS or VTK 4.4.x and above (when released) the instructions are essentially the same, except that you do not have to download and build GL2PS separately.

Download packages

  1. Get the latest available stable version of Python from the

  1. Download and install ActiveTcl with the version as close to the

  1. Install the latest stable CMake from [WWW] http://www.cmake.org

  2. Download GL2PS from [WWW] http://www.geuz.org/gl2ps

  3. Download the VTK sources from [WWW] http://www.vtk.org/get-software.php

Build GL2PS

  1. Untar the GL2PS sources somewhere.

  2. Download the attached 添付ファイル"CMakeLists.txt"のアップロード

  1. Start CMakeSetup and point it to the GL2PS source directory and

  1. No need to choose advanced options. Simply hit configure once,

  1. Start up MSdev and open the generated GL2PS.dsw file (it will be

  1. Select the ALL_BUILD classes, select your default build and build the

Build VTK

  1. Download the VTK sources, get the latest CVS or a nightly release.

  1. Click on CMakeSetup that you should have installed.

  2. Set the source directory and destination directory, use a

  1. Select the advanced options checkbox.

  2. Turn on the following options

    1. Shared libraries, Hybrid, GL2PS, Patented, Tcl Wrapping and

    • Python Wrapping. Turning on Tcl wrapping is not a must but might be useful. Note that if you do not turn on Tcl wrapping, you still need to make sure that the entries for the Tcl and Tk libraries and headers are correctly entered to ensure that the Python-Tk widgets are built.

    1. It should detect the right location and path for Python and

    • Tcl. It might complain about the python_debug_library, you can ignore it.

    1. Now press the configure button.

    2. After configure has run, edit the GL2PS settings, point the

    • include directory to the right place and choose the gl2ps.lib that we just built.

  3. Press configure again. The OK button should be activated now.

  4. Press OK.

  5. It is recommended that you have a minimum of 300MByte swap space

  1. Start up MSdev and open the file VTK_BUILD/VTK.dsw.

  2. Click on the ALL_BUILD classes item, go to project/settings and set

  1. Build the project.

  2. Take a break. The build will take a few hours.

Installing GL2PS and VTK

  1. First install VTK for Python by doing the following. Note that currently this works best

  1. Create a directory where you will put all the VTK dlls, lets call

  1. Copy the gl2ps.dll that you built into DLL_DIR.

  2. Add DLL_DIR to system environments PATH.

  3. Now untar MayaVi to say MAYAVI_DIR, test it like so:

You should be all set now. You should be able to use VTK and MayaVi from Python.

last edited 2004-09-20 16:23:33 by 193


SourceForge.net Logo