Detailed installation of Windows VTK6.0.0 (CMake instructions for use)

Source: Internet
Author: User

Operating system: WINDOWS7, using tools: Visual Studio, CMake.

1. Preparatory work

VTK Download:

Download the latest VTK stable version (6.0.0, as of July 2013) http://www.vtk.org/VTK/resources/software.html

CMake Download and install:

The latest version of VTK does not provide installer under Windows and requires its own build (build) and compile (Compile) source code. Here is a gadget cmake to download and install http://www.cmake.org/cmake/resources/software.html

2. Build

On Windows, the so-called "build" is to use CMake to configure the downloaded source file to be a vs project.

Open the CMake, "where is the source code:" Browse to the downloaded VTK (extracted) source file directory, "Where to build the binaries:" Browse to the folder you want to put vs project (preferably create a new folder), such as:

Note that the "where is the source code:" File structure under the sources directory is broadly similar to the one where the "readme.html" file is the official installation of the VTK Guide (English):

Click the "Configure" button, select the VS compiler (this article uses vs2008,vs2010 always crashes), end the point "Finish" button, such as:

After a while, the following configuration interface appears, the meaning of each can be looked up just mentioned "readme.html", here see an item is an address, that is the installation address:

After configuring the items, the red disappears after clicking the "Configure" button, and then clicking the "Generate" button to start building vs Project:

At this point you can see the "Where to build the binaries:" Configuration of the VS project under the directory:

3. Compiling and installing

Open the generated VS project (double-click the "VTK.sln" file), the approximate structure of the project is as follows:

Build the "All_build" project, compile the VTK (takes a long time, about 30 minutes):

Build the "Install" Project and install VTK:

As you can see, the file structure under the configured installation directory is roughly the following:

At this point, the installation is complete, you can also add the "Bin" folder address in the installation directory to the environment variable "PATH", so that when running the VTK program can find those DLL files, of course, copy these DLL files to the directory to execute the file is also possible.

Finally, you need to explain:

To compile debug and release versions of the libraries separately for use by the debug and Release configuration programs;

The libraries I compiled on VS2008 cannot be used on VS2010 and VS2012, and libraries compiled on VS2012 cannot be used on VS2008 and VS2010. Libraries compiled with VS2008 on 32-bit Win7 can be used on VS2008 (32-bit) on 64-bit Win7.

Detailed installation of Windows VTK6.0.0 (CMake instructions for use)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.