# Building Slicer on Windows 10

**URL:** <https://discourse.slicer.org/t/building-slicer-on-windows-10/720>\
**Category:** Development\
**Created:** [July 20, 2017, 7:24am UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720 "2017-07-20T07:24:48Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandra](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandra](https://discourse.slicer.org/u/sandra)\
**Post date:** [July 20, 2017, 7:24am UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/1 "2017-07-20T07:24:48Z")

</div>

Hi everyone !

I would like to build Slicer on Windows 10. To do so, I’m using Microsoft Visual Studio 2013 and as a prerequisite I built Qt 5.9.1 (the latest).  
Then I use cmake to build Slicer, as option I set QT\_QMAKE\_EXECUTABLE to the path to qmake and I change Slicer\_REQUIRED\_QT\_VERSION to 5.9.1

I got the following error: “Qt 5.9.1 was not found on your system. You probably need to set the QT\_QMAKE\_EXECUTABLE variable”. I’ve already set this variable to the right path to qmake …

Any idea ?

Thanks,

Sandra.

---

<div class="post-metadata">

**Author:** ![finetjul](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/finetjul/32/146_2.png) [@finetjul](https://discourse.slicer.org/u/finetjul)\
**Post date:** [July 20, 2017, 8:03am UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/2 "2017-07-20T08:03:41Z")

</div>

Hi Sandra,

While docs do not expressively mention that Qt 5 is supported by Slicer, it does not say either that you can compile with Qt 5.

[https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build\_Instructions/Prerequisites/Qt#Windows](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions/Prerequisites/Qt#Windows)

You might want to give a try with the recommended version for Visual Studio 2013 aka Qt 4.8.7

Hth,  
Julien.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [July 20, 2017, 12:30pm UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/3 "2017-07-20T12:30:35Z")

</div>

Hi Sandra -

Julien is right that only the versions of Qt and VisualStudio described on the wiki can be expected to work.

There is experimental work to compile with newer versions but there are still several issues to resolve as described at the link below. Any help with the port would be very welcome!

[https://www.slicer.org/wiki/Documentation/Labs/Qt5](https://www.slicer.org/wiki/Documentation/Labs/Qt5)

-Steve

---

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [July 23, 2017, 1:39pm UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/4 "2017-07-23T13:39:04Z")

</div>

From

[https://sourceforge.net/projects/qt64ng/](https://sourceforge.net/projects/qt64ng/)

download

[https://sourceforge.net/projects/qt64ng/files/qt/x86-64/4.8.7/msvc2013/qt-4.8.7-x64-msvc2013.exe/download](https://sourceforge.net/projects/qt64ng/files/qt/x86-64/4.8.7/msvc2013/qt-4.8.7-x64-msvc2013.exe/download)

to save yourself a ton of time.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 23, 2017, 2:04pm UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/5 "2017-07-23T14:04:34Z")

</div>

I think this downloadable Qt package doesn’t include OpenSSL, so a couple of things will be broken. For example, download of any data from https sites will not work, therefore no sample data can be downloaded, extension manager and some Python packages will not work, etc.

Jc’s one-liner Qt build script works very well, it doesn’t require any user interaction, but it certainly takes a couple of hours of your computer to build.

---

<div class="post-metadata">

**Author:** ![adamrankin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/adamrankin/32/155_2.png) [@adamrankin](https://discourse.slicer.org/u/adamrankin)\
**Post date:** [July 23, 2017, 2:06pm UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/6 "2017-07-23T14:06:09Z")

</div>

Ooohhh… if we build our own Qt we can enable Slicer\_Python\_…\_OpenSSL?

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [July 23, 2017, 5:17pm UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/7 "2017-07-23T17:17:13Z")

</div>

> [@adamrankin](#):
>
> if we build our own Qt we can enable Slicer\_Python\_…\_OpenSSL?

Yes, this will work nicely on all platforms

---

<div class="post-metadata">

**Author:** ![sandra](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandra](https://discourse.slicer.org/u/sandra)\
**Post date:** [July 24, 2017, 7:23am UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/8 "2017-07-24T07:23:44Z")

</div>

Ok, that’s what I thought … So I’m trying to build Qt 4.8.7, not successfully for now.

> [@lassoan](#):
>
> Jc’s one-liner Qt build script works very well, it doesn’t require any user interaction, but it certainly takes a couple of hours of your computer to build.

I didn’t understand which script you’re talking about (if it is working well I don’t mind if it requires several hours to run)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 24, 2017, 11:03am UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/9 "2017-07-24T11:03:25Z")

</div>

It’s described on Slicer build instructions page:

[https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build\_Instructions/Prerequisites/Qt#Windows](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions/Prerequisites/Qt#Windows)

---

<div class="post-metadata">

**Author:** ![sandra](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandra](https://discourse.slicer.org/u/sandra)\
**Post date:** [July 25, 2017, 9:48am UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/10 "2017-07-25T09:48:32Z")

</div>

Yes ok

I tried to build Qt a first time with this script about a week ago and had an error I couldn’t solve.

I tried again yesterday and now it’s working, don’t know why but it’s working !

Thanks

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 25, 2017, 12:42pm UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/11 "2017-07-25T12:42:21Z")

</div>

I and other lab members used the script on several computers without problems. Maybe you haven’t executed the script with sufficient privileges or copy-pasted an incomplete command line. Next time, if you find any errors, report the used command line and displayed error messages immediately.

---

<div class="post-metadata">

**Author:** ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)\
**Post date:** [December 19, 2018, 3:53am UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/12 "2018-12-19T03:53:31Z")

</div>

Hi,  
How can I build slicer 4.10 on windows 10. what visual studio is required and what are the other requirements.

Thank you

Regards,  
Saima Safdar

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 19, 2018, 3:56am UTC](https://discourse.slicer.org/t/building-slicer-on-windows-10/720/13 "2018-12-19T03:56:39Z")

</div>

See this page: [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build\_Instructions](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions)

Follow the instructions very accurately. Let us know if anything is unclear or you run into any issues.
