Read a lot of tutorials, took 1 days and a half of time to put on, recorded.
Preconditions: I installed the VS2015 to compile the project.
Resources
Official: http://www.vtk.org/Wiki/VTK/Building
Installation: http://blog.csdn.net/Chinamming/article/details/16802787
Configuration: http://blog.csdn.net/jane_yuhui/article/details/51941439
http://blog.csdn.net/u011130094/article/details/52061321
First, download the installation package
1.VTK Source + data
I previously on the official website has been compiled error, later on the GitHub version, success, do not know why the record. The version on GitHub includes both the source code (VTK) and the data (Vtkdata).
Links: Https://github.com/Kitware/VTK
2.CMake Tools
The installation package that is searched directly on the net, the file name is Cmake-3.8.2-win64-x64.msi
Second, the Configure project with CMake
1. Prepare the catalogue first.
D:\installed\VTK\VTK-master (release source code)
D:\installed\VTK\bin (Put cmake output, new)
D:\installed\VTK\VTK Install (last installed directory, new)
2. (Key Step) Open the CMake tool to set the above path, click Configue, select Vs2015 compiler, modify the parameters repeat Configue, until there is no red, and finally press generate. Close the CMake tool
- QT option is not hooked later when combining QT
- Install_prefix that path is also set to D:\installed\VTK\VTK install
- See the reference link for specific settings
After that, go to the Bin directory and open the SLn file with vs2015, then click Generate. Then go to build the install project, and then D:\installed\VTK\VTK install inside the final generated VTK.
Four, after the installation of the configuration
The main thing is to add environment variables, set the project properties in the newly created project see Resources for details,
Met 1-linker problem and 2-C00015 error, the data inside also has the solution, does not write.
1-system32 directory There is also a SysWOW64 folder, so ...
2-Need to add:
#include <vtkAutoInit.h>
Vtk_module_init (vtkRenderingOpenGL2);
Vtk_module_init (Vtkinteractionstyle);
Single-Stick map
Finally put a demo, continue the study tomorrow. How to use Documents and Vtkdata
Install VTK on Windows