# Building Slicer from source

**URL:** <https://discourse.slicer.org/t/building-slicer-from-source/17823>\
**Category:** Support\
**Created:** [May 27, 2021, 10:57am UTC](https://discourse.slicer.org/t/building-slicer-from-source/17823 "2021-05-27T10:57:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [May 27, 2021, 10:57am UTC](https://discourse.slicer.org/t/building-slicer-from-source/17823/1 "2021-05-27T10:57:36Z")

</div>

I was able to build Slicer following [this tutorial](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/windows.html)

I have not tested if all the functionalities work without crash but at least the sliceViews and the 3D View work.

I had to change one line of the instructions a little bit for it to work. Here it is in case some one needs it:

```auto
"C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DQt5_DIR:PATH=C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5 C:\D\S4\Slicer

```

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [May 27, 2021, 3:21pm UTC](https://discourse.slicer.org/t/building-slicer-from-source/17823/2 "2021-05-27T15:21:11Z")

</div>

You are correct that the “Visual Studio 16 2019 Win64” is not an appropriate generator name.  
See [CMake 3.14 Release Notes](https://cmake.org/cmake/help/latest/release/3.14.html#generators) where the CMake generator platform must be set with the “-A” command line option starting with the VS 2019 generator which was introduced in this version.

@mau_igna_06 That documentation can be changed in the following file which is located in the Slicer GitHub repo. Could you issue a PR to fix this? Thanks! [Slicer/windows.md at master · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/blob/master/Docs/developer_guide/build_instructions/windows.md)
