Building Slicer on Windows 10

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.

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

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

Hth,
Julien.

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

-Steve

From

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

to save yourself a ton of time.

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.

Ooohhh… if we build our own Qt we can enable Slicer_Python_…_OpenSSL?

Yes, this will work nicely on all platforms

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

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)

It’s described on Slicer build instructions page:

https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions/Prerequisites/Qt#Windows

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

1 Like

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.

1 Like

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

See this page: 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.