Did anyone have succesfully built the latest Slicer on Windows 10 machine.
I am building slicer on my Windows 10 machine, and the compiler is “Visual studio 14 2015”.
The error message came from the qSlicerApplicationHelper.cxx file at line 125
"SetProcessDPIAware() identifier not found"
I’ve built Slicer successfully this morning on Win10. Have you built from scratch?
I did, I used VS2013 community edition (the free edition). Try this:
- Considere all points mentioned in the slicer website.
- Use qt-easy-build the way the README tells you. Run this command in VS2013 x64 Native Tools Command Prompt:
@powershell -Command “$destDir=‘C:\sw\Qt4’;$buildType=‘Release’;$qtPlatform=‘win32-msvc2013’;$bits=‘64’;iex ((new-object net.webclient).DownloadString(‘https://raw.githubusercontent.com/jcfr/qt-easy-build/4.8.7/windows_build_qt.ps1’))”
- Use short names without special characters for your slicer source and build e.g. c:\sw\ssrc and c:\sw\sbd
- Use superbuild in cmake options as this solves many versions conflicts.
You need Qt5 to build nightly version of Slicer.
As detailed in Are Qt4 and Qt5 still supported? , it is still possible to build with Qt4. That is why, @brhoom was able to build against Qt 4.8.7.
SetProcessDPIAware() identifier not found
This seems to be a legitimate error, as recommended in the associated documentation, we will look into switching to use
I installed QT5.10, but it seems like QWebEngineer was not installed correctly. Will reinstall Qt5 and rebuild again.
@leochan2009 Have you resolved the problem! I had also encountered the same issue under win 10 using VS 2015+QT5.10! I had commented this line and built Slicer successfully? I’m not sure whether this will influence Slicer’s GUI!
hi, I resolved the problem by reinstalling Qt5 with web engine and script support.
@leochan2009, Thanks! I will try!
hi，do you use the Qt5 x64？ could you tell me how to build Qt5 x64 from source?
On Windows, you don’t have to build Qt5, you can just download from Qt’s website. I don’t know how is it now on Linux and Mac.
I am using the official Qt5 downloads on Mac, and I know a few others are as well.
I haven’t used the official Linux downloads, but if they are not compatible with your distribution then the recommended way to build from source is qt-easy-build.
I’ve used the official Qt5 downloads on ubuntu and they worked fine. Not sure about other distros.
I am trying to build slicer on window 10 but ran across too many errors. The one that is repeatedly coming is below:
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: ‘Python.h’: No such file or directory [C:\Slicer4\Slicer4-superbuild\CTK-build\PythonQt-build\PythonQt.vcxproj] [C:\Slicer4\Slicer4-superbuild\CTK-build\PythonQt.vcxproj] CTK c:\slicer4\slicer4-superbuild\ctk-build\pythonqt\src\pythonqtpythoninclude.h 90
visual studio 15 2017
qt 4.7.4 before this I installed qt 4.8.6 but it failed with that saying qt 4.7.4 is required.
At the end of build it says:
error : VTK was not configured to use QT, you probably need to recompile it
52> with VTK_USE_GUISUPPORT ON, VTK_Group_Qt ON, DESIRED_QT_VERSION 4 and
52> QT_QMAKE_EXECUTABLE set appropriatly. Note that Qt >= 4.7.4 is required
Can you please list down the steps?
I am building slicer on window 10 but failed.
I didnt succeded on building slicer on window 10.
Using visual studio 2013 update 5 x86(do you know where can I find x64) or can u post the community edition link.
qt 4.8.7 easy build
Error 65 error LNK1181: cannot open input file ‘…\CTK-build\CTK-build\bin\Release\CTKScriptingPythonWidgets.lib’ [C:\Slicer4\Slicer4-superbuild\Slicer-build\Libs\MRML\Widgets\qMRMLWidgets.vcxproj] C:\Slicer4\Slicer4-superbuild\LINK Slicer
Error 66 error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’ [C:\Slicer4\Slicer4-superbuild\Slicer-build\Base\QTCore\qSlicerBaseQTCore.vcxproj] C:\Slicer4\Slicer4-superbuild\QtGui4.lib(QtGui4.dll) Slicer
Error 67 error C2664: ‘bool vtkMRMLTransformNode::AreTransformsEqual(vtkAbstractTransform *,vtkAbstractTransform *)’ : cannot convert argument 1 from ‘vtkNew’ to ‘vtkAbstractTransform *’ [C:\Slicer4\Slicer4-superbuild\Slicer-build\Libs\MRML\Core\Testing\MRMLCoreCxxTests.vcxproj] C:\Slicer4\Libs\MRML\Core\Testing\vtkMRMLTransformNodeTest1.cxx 131 1 Slicer
Error 68 error C2660: ‘vtkAddonTestingUtilities::CheckInt’ : function does not take 3 arguments [C:\Slicer4\Slicer4-superbuild\Slicer-build\Libs\MRML\Core\Testing\MRMLCoreCxxTests.vcxproj] C:\Slicer4\Libs\MRML\Core\Testing\vtkMRMLTransformNodeTest1.cxx 131 1 Slicer
Error 20 error LNK1181: cannot open input file ‘…\CTK-build\CTK-build\bin\Release\CTKScriptingPythonWidgets.lib’ [C:\Slicer4\Slicer4-superbuild\Slicer-build\Libs\MRML\Widgets\qMRMLWidgets.vcxproj] C:\Slicer4\Slicer4-superbuild\LINK Slicer
LINK : fatal error LNK1181: cannot open input file ‘…\CTK-build\CTK-build\bin\Release\CTKWidgets.lib’ [C:\Slicer4\Slicer4-superbuild\Slicer-build\Base\QTGUI\qSlicerIconEnginePlugin.vcxproj]
53> 27 Warning(s)
53> 5 Error(s)
53> Time Elapsed 00:49:42.73
54>------ Build started: Project: ALL_BUILD, Configuration: Release Win32 ------
========== Build: 52 succeeded, 2 failed, 0
Thanks for your interest in 3D Slicer!
If you are not developing with Slicer and would simply like to use it, please consider downloading Slicer from the website instead of manually building the program.
I would also highly suggest building the latest Slicer Nightly/Preview to take advantage of the latest features and fixes. You are more likely to receive help if problems arise while you are developing using the latest Slicer code.
Now, your current problems building Slicer are likely from configuration errors. I’ll provide of list of some things to consider below. Also, if you have any more problems, it is probably best to open a new thread on the forum to help debug your specific issues.
For Slicer 4.8.1:
- Make sure you have checked out the correct source code. “master-48” branch, not the default “master”
- Build qt 4.8.7 x64 using qt-easy-build with the correct build type (Debug vs. Release) that you want. Make sure you are using the VS2013 x64 command prompt.
- When you are configuring the build using CMake GUI, make sure you have picked the correct generator. For this Slicer version you should select “Visual Studio 12 2013 Win64” and not “Visual Studio 12 2013”.
- When you go to build the Slicer solution, make sure you are picking the same build type (Debug vs Release) as your Qt build.
- If a previous build failed or you incorrectly configured with the wrong generator, it is best to completely clear your binary folder are start the build process over.
Since the nightly build instructions don’t seem up-to-date for the current Slicer Nightly/Preview here’s some hints:
- Check out the regular “master” branch of the Slicer repo.
- Download the Qt5 binaries such as Qt 5.10.1 from their website
- When you are configuring the build using CMake GUI, make sure you have picked the correct generator. I have Visual Studio 2017 installed with the “VC++ 2015.3 v14.00 (v140) toolset for desktop”. In CMake-gui choose “Visual Studio 15 2017 Win64” and specify v140 as the optional toolset to use.
- During configuration change Slicer_VTK_VERSION_MAJOR to 9.
- Then configure and select your Qt5_DIR
Thanks for your reply. I will be developing with Slicer. Can you please provide me the details on building the latest slicer.
Should I use this to download slicer source code:
svn co http://svn.slicer.org/Slicer4/branches/Slicer-4-8 Slicer-r26813 -r 2681