VTK on windows10

I have used VTK in Linux. Now I need to use VTK in windows10. Is there a way I can use that like Ubuntu systems…like ccmake and make command lines and all for C++ codes?


Yes, you can use CMake to generate VTK project/solution … I haven’t used command line, just GUI CMake.

Which Virtual studio IDE setup shall I install in minimum capacity just to run VTK?


The closest is to use the Ninja generator and the nija-build command.

Here is how to do it :

  • Download and install Visual Studio 2015
  • Download ninja-build and copy it into C:/ : https://ninja-build.org/
  • Download and install CMake
  • Open a Visual Studio 2015 64Bit native command
  • run cmake-gui from this command
  • Configure VTK project with ninja generator
  • run ninja from the native command

You do not need to even run Visual Studio :slight_smile:

I have already installed VS2019 version. Could you also tell me how to open the native command?
I have searched and tried and end up in power shell command prompt.
Also do I need Xming to visualize?

It is not the power shell command.

Just press the Window key and type in “Native”, it should appears.
If it does not appears, you may need to reinstall visual studio and make sure this component is enabled.
The name of the exectuable is exactly : VS2019 x64 Native Tools Command Prompt

You do not need Xming.

1 Like

I reinstalled 8.2.0 version using VStudio 2019 and CMake 3.10.
I am editing the codes in VS and running the executables using Gitbash.
So far it is working as it should(though seems slow). If I do not need Xming I will probably get rid of it.
Thank you for replying.

hi friends:
Thank you in advance!!
I am trying to compile VTK as below tool chain: Cmake3.21.1 + VS2022 + VTK 9.1 + ninja
the detail command as below:

But though I had set the install-prefix to specify the install path, after the ninja done, the install directory is still empty, where is my compile result ??? what should I do ???

it is so so so so so so so so so diffcullt to built VTK9.1, I just want use vtk with QT6, I had encounter too many issues, it makes me confuse and had taken me too too too too many many many time, what a badly software!!!


You should learn CMake before trying to build VTK

this issue had resolved, I had not execute ninga install!!!
Thank you again!!

The ninja command builds the software - if you look in build/lib you will see that VTK has been built.

If you run ninja install, it will install the library and headers to CMAKE_INSTALL_PREFIX

1 Like