Vtk8.2.0 (32bit + 64bit) compilation and installation test (win10 + vs2017 + Qt5)

This article referred to the following articles in the installation process, and I would like to express my thanks to the following bloggers! :
https://blog.csdn.net/anhec/article/details/86777302
I. Preparation before installation
Visual Studio 2017 qt5cmakevtk source (https://vtk.org/download/)
Two. VTK compilation
My compile directory is as follows

Run CMake as follows

Click Configure, select Visual Studio 15 2017 (32bit) or Visual Studio 15 2017 Win64 (64bit), and click Finish.

When configure is complete, manually modify some of the parameters as follows:

    BUILD_SHARED_LIBS, unchecked if static lib generation is needed; BUILD_EXAMPLES, which generate test cases, check the suggested box for easy post-compile testing; CMAKE_DEBUG_POSTFIX, which means that in debug mode the filename is followed by the specified character; VTK_Group_Qt, VTK supports Qt; CMAKE_INSTALL_PREFIX, set the VTK installation directory (D:\libraries\I_VTK\VTK\bin\x86 or D:\libraries\I_VTK\VTK\bin\x64);

Click Configure again to Configure the Qt path

Select the Qt path: (32bit) D:\libraries\Qt\Qt5.12.0\5.12.0\msvc2017\lib\cmake\Qt5
(64 – bit) D: \ libraries \ Qt \ Qt5.12.0\5.12.0 \ msvc2017_64 \ lib \ cmake \ Qt5
Click Configure again (change the red color if it still appears, then click Configure) and click Generate when you’re done.

III. VS2017 compilation
Open vtk.sln with vs2017, then right-click ALL_BUILD, click build, wait for some time, all compile successfully;



Right-click Install again and select Project Only –>; Only generate INSTALL, after completion you can see in the installation directory (D:\libraries\I_VTK\VTK\bin\x86), see the related lib, include, etc


In VS2017, change the configuration from Debug to Release, repeat ALL_BUILD and INSTALL above;
Test three.

Select Cube and run

 
 
 
 
 
 
 
 


Read More: