Day038 — How to install VTK, GLM, Boost on Windows
I have a project that has to install VTK, GLM and Boost on Windows using Visual Studio. Here is the process of how I do that from scratch.
Below is the version and link I used to download the software.
Visual Studio Community 2017 15.5.2
VTK 8.0.1
Boost 1.65.1
glm 0.9.8.5
Visual Studio
In the Visual Studio Installer, check the “development tools for c++”, which should be checked in default, to install Visual C++ Build Tools for Visual Studio 2017.
VTK
Here is the process I took for building VTK.
- download source code from VTK website
- put the folder to
C:\local
- open cmake-gui 3.9.1 (assume you installed cmake)
- choose
C:\local\vtk
as source and chooseC:\local\vtk\bin
as build - click
configure
button - check
advanced options
to show more - check
build examples
,Module_vtkTestingcore
andModule_vtkTestingRendering
to include these module for build - click
generate
to generate Visual Studio project - run visual studio community 2017 as administrator
- use that visual studio to open the project (.sln) newly generated by cmake
- right click
all_build
to build - right click
install
to build - VTK will be installed to
C:\Program Files\VTK
- Put
C:\Program Files\VTK\bin
to path variable in environment variables. (remember to reopen applications (like visual studio) for them to see this variable change)
I refer below link to do the compile and install.
I also use below YouTube video for reference.
Boost
Below is the link to download the Window Binaries pre-built. It provides an easy set up of Boost on Windows.
Choose the right binary for the right compiler to download. For my case, I am using a 64 bit computer and VS 2017 C++ Build Tools, which comes with Visual Stduio 2017. Therefore, the right one for me is “boost_1_65_1-msvc-14.1–64.exe”.
- 14.1 means Visual C++ Build Tools for VS 2017
- 64 means 64-bit machine
(14.0 means Visual C++ Build Tools for VS 2015)
After the download is finished, simply execute it. The setup is straight forward without any complex configuration, it should be a no-brainer. You can check C:\local\boost
to see what is installed. The directory should look like this.
Also, in below link, you will find all versions of binaries built for specific compiler on Windows.
GLM
GLM is a header library. It means that you just download it, unzip and copy the folder to the place you desired. I placed the GLM folder to C:\local
. I just like it to be alongside with Boost’s directory.
Summary
By now, I have installed VTK, Boost, GLM on my computer. VTK is installed in C:\Program Files\VTK
. Boost and GLM are insalled in C:\local
. In next post, I will show you how I include and link them in my visual studio project.