# VTK on windows10

**URL:** https://discourse.vtk.org/t/vtk-on-windows10/2131
**Category:** Support
**Created:** [November 23, 2019, 9:17pm UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131 "2019-11-23T21:17:53Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![banikr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@banikr](https://discourse.vtk.org/u/banikr)
#### Post date: [November 23, 2019, 9:17pm UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/1 "2019-11-23T21:17:53Z")

</div>

Hello,  
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?

Thanks

---

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [November 24, 2019, 5:43pm UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/2 "2019-11-24T17:43:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![banikr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@banikr](https://discourse.vtk.org/u/banikr)
#### Post date: [November 25, 2019, 12:51am UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/3 "2019-11-25T00:51:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [November 25, 2019, 10:50am UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/4 "2019-11-25T10:50:32Z")

</div>

@banikr.

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/](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 🙂

---

<div class="post-metadata">

### Author: ![banikr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@banikr](https://discourse.vtk.org/u/banikr)
#### Post date: [November 25, 2019, 6:54pm UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/5 "2019-11-25T18:54:52Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [November 26, 2019, 9:02am UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/6 "2019-11-26T09:02:58Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![banikr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/b9bd4f/32.png) [@banikr](https://discourse.vtk.org/u/banikr)
#### Post date: [November 26, 2019, 6:52pm UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/7 "2019-11-26T18:52:39Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![longjiang321](https://discourse.vtk.org/user_avatar/discourse.vtk.org/longjiang321/32/8727_2.png) [@longjiang321](https://discourse.vtk.org/u/longjiang321)
#### Post date: [January 22, 2022, 8:24am UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/8 "2022-01-22T08:24:37Z")

</div>

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:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/9/9b08fa130e0e5aa9ddc8aadd68d6db427ed93df3.png)

**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!!!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [January 22, 2022, 10:10am UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/9 "2022-01-22T10:10:09Z")

</div>

```auto
-DCMAKE_INSTALL_PREFIX=

```

You should learn CMake before trying to build VTK  
[https://cmake.org/cmake/help/v3.0/variable/CMAKE\_INSTALL\_PREFIX.html](https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html)

---

<div class="post-metadata">

### Author: ![longjiang321](https://discourse.vtk.org/user_avatar/discourse.vtk.org/longjiang321/32/8727_2.png) [@longjiang321](https://discourse.vtk.org/u/longjiang321)
#### Post date: [January 22, 2022, 11:51am UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/10 "2022-01-22T11:51:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Aron\_Helser](https://discourse.vtk.org/user_avatar/discourse.vtk.org/aron_helser/32/14_2.png) [@Aron\_Helser](https://discourse.vtk.org/u/Aron_Helser)
#### Post date: [January 22, 2022, 2:14pm UTC](https://discourse.vtk.org/t/vtk-on-windows10/2131/11 "2022-01-22T14:14:06Z")

</div>

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`
