[vtkusers] Cannot install Qt 5.6.2 with VTK 7.0 on Windows 8.1, Microsoft Visual Studio Community 2015
Elvis Stansvik
elvis.stansvik at orexplore.com
Tue May 23 07:47:22 EDT 2017
2017-05-23 13:02 GMT+02:00 MarWas18 <marcinwas94 at interia.pl>:
> In fact nothing worked. May someone share working configuration for GUI
> development on Windows 8.1 with links for download (VTK version, CMake
> version, Qt and Microsoft Visual Studio versions) and if possible step by
> step installation tutorial, please?
Since my setup is quite similar to yours (though I don't use the IDE
part of MSVC, only the compiler), here it goes:
1. Install Visual C++ 2015 Build Tools
(http://landinghub.visualstudio.com/visual-cpp-build-tools)
2. Install CMake 3.7.2 from installer
(https://cmake.org/files/v3.7/cmake-3.7.2-win64-x64.msi)
3. Install Ninja 1.7.2 by unpacking .zip
(https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip)
4. Install Qt 5.6.2 from offline installer
(http://download.qt.io/official_releases/qt/5.6/5.6.2/qt-opensource-windows-x86-msvc2015_64-5.6.2.exe)
All of these are for Windows 64-bit.
Then, to get a command prompt suitable for building VTK with Qt support:
1. Start a "Qt 5.6 64-bit for Desktop (MSVC 2015)" command prompt (a
shortcut is installed by Qt).
2. Choose the correct compiler by running:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
Then, assuming
1. Qt was installed to %HOMEDRIVE%%HOMEPATH%/Qt.
2. The VTK source is in %HOMEDRIVE%%HOMEPATH%\VTK-7.1.1
3. You want to install VTK to %HOMEDRIVE%%HOMEPATH%\VTK-7.1.1-inst
4. The ninja.exe executable is in %HOMEDRIVE%%HOMEPATH%\ninja.exe
you can configure, build and install VTK with
cd %HOMEDRIVE%%HOMEPATH%\VTK-7.1.1
mkdir build
cd build
cmake ^
-DCMAKE_INSTALL_PREFIX=%HOMEDRIVE%%HOMEPATH%\VTK-7.1.1-inst ^
-DVTK_Group_Qt=ON ^
-DVTK_QT_VERSION=5 ^
-DQt5_DIR=%HOMEDRIVE%%HOMEPATH%/Qt/Qt5.6.2/5.6/msvc2015_64/lib/cmake/Qt5 ^
-DVTK_Group_Imaging=ON ^
-DVTK_Group_Views=ON ^
-DVTK_Group_MPI=OFF ^
-DVTK_Group_Tk=OFF ^
-DVTK_Group_Web=OFF ^
-DVTK_Group_StandAlone=OFF ^
-DBUILD_TESTING=OFF ^
-DVTK_USE_SYSTEM_LIBRARIES=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_MAKE_PROGRAM=%HOMEDRIVE%%HOMEPATH%\ninja.exe ^
-GNinja ^
..
cmake --build . --config Release
cmake --build . --target install
Obviously, the flags for enabling/disabling stuff will look different
depending on what you want.
Newer version of CMake should work, it's just that 3.7.2 was the
latest when I did this.
Hope that helps,
Elvis
>
> Thank you,
> Marcin
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Cannot-install-Qt-5-6-2-with-VTK-7-0-on-Windows-8-1-Microsoft-Visual-Studio-Community-2015-tp5743206p5743356.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list