[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

2. Install CMake 3.7.2 from installer

3. Install Ninja 1.7.2 by unpacking .zip

4. Install Qt 5.6.2 from offline installer

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

mkdir build
cd build
cmake ^
    -DVTK_Group_Qt=ON ^
    -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 ^
    -DCMAKE_BUILD_TYPE=Release ^
    -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,

> 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