# Problem with the installation of vtk and qt modules

**URL:** https://discourse.vtk.org/t/problem-with-the-installation-of-vtk-and-qt-modules/4464
**Category:** Support
**Created:** [October 21, 2020, 9:25pm UTC](https://discourse.vtk.org/t/problem-with-the-installation-of-vtk-and-qt-modules/4464 "2020-10-21T21:25:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ruf](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/r/a5b964/32.png) [@Ruf](https://discourse.vtk.org/u/Ruf)
#### Post date: [October 21, 2020, 9:25pm UTC](https://discourse.vtk.org/t/problem-with-the-installation-of-vtk-and-qt-modules/4464/1 "2020-10-21T21:25:47Z")

</div>

Hello everybody, I’m trying to install VTK with some Qt modules, when trying to compile ALL\_BUILD in Visual Studio 2019, I get a series of errors that seem to come from the main error related to the vtkRenderingQt module. I attach the output (sorry for the language).

1\>------ Operación Compilar iniciada: proyecto: vtkRenderingQt, configuración: Debug x64 ------  
1\>vtkQtLabelRenderStrategy.cxx  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(229,18): error C2079: ‘path’ utiliza class ‘QPainterPath’ sin definir  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(331,16): error C2079: ‘path’ utiliza class ‘QPainterPath’ sin definir  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(371,40): error C2664: ‘void QPainter::fillPath(const QPainterPath &,const QBrush &)’: el argumento 1 no puede convertirse de ‘int’ a ‘const QPainterPath &’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(371,40): message : Razón: no se puede realizar la conversión de ‘int’ a ‘const QPainterPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(371,40): message : Uso del tipo no definido ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(69,7): message : vea la declaración de ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(297,10): message : vea la declaración de ‘QPainter::fillPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(375,36): error C2664: ‘void QPainter::fillPath(const QPainterPath &,const QBrush &)’: el argumento 1 no puede convertirse de ‘int’ a ‘const QPainterPath &’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(375,36): message : Razón: no se puede realizar la conversión de ‘int’ a ‘const QPainterPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(375,36): message : Uso del tipo no definido ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(69,7): message : vea la declaración de ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(297,10): message : vea la declaración de ‘QPainter::fillPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(442,18): error C2079: ‘path’ utiliza class ‘QPainterPath’ sin definir  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(467,35): error C2664: ‘void QPainter::fillPath(const QPainterPath &,const QBrush &)’: el argumento 1 no puede convertirse de ‘int’ a ‘const QPainterPath &’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(467,35): message : Razón: no se puede realizar la conversión de ‘int’ a ‘const QPainterPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(467,35): message : Uso del tipo no definido ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(69,7): message : vea la declaración de ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(297,10): message : vea la declaración de ‘QPainter::fillPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(471,31): error C2664: ‘void QPainter::fillPath(const QPainterPath &,const QBrush &)’: el argumento 1 no puede convertirse de ‘int’ a ‘const QPainterPath &’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(471,31): message : Razón: no se puede realizar la conversión de ‘int’ a ‘const QPainterPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(471,31): message : Uso del tipo no definido ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(69,7): message : vea la declaración de ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(297,10): message : vea la declaración de ‘QPainter::fillPath’  
1\>vtkQtStringToImage.cxx  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(109,16): error C2079: ‘path’ utiliza class ‘QPainterPath’ sin definir  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(140,16): error C2079: ‘path’ utiliza class ‘QPainterPath’ sin definir  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(187,16): error C2079: ‘path’ utiliza class ‘QPainterPath’ sin definir  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(213,33): error C2664: ‘void QPainter::fillPath(const QPainterPath &,const QBrush &)’: el argumento 1 no puede convertirse de ‘int’ a ‘const QPainterPath &’  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(213,33): message : Razón: no se puede realizar la conversión de ‘int’ a ‘const QPainterPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(213,33): message : Uso del tipo no definido ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(69,7): message : vea la declaración de ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(297,10): message : vea la declaración de ‘QPainter::fillPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(217,29): error C2664: ‘void QPainter::fillPath(const QPainterPath &,const QBrush &)’: el argumento 1 no puede convertirse de ‘int’ a ‘const QPainterPath &’  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(217,29): message : Razón: no se puede realizar la conversión de ‘int’ a ‘const QPainterPath’  
1\>C:\vtk\src\Rendering\Qt\vtkQtStringToImage.cxx(217,29): message : Uso del tipo no definido ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(69,7): message : vea la declaración de ‘QPainterPath’  
1\>C:\Qt\5.15.1\msvc2019\_64\include\QtGui\qpainter.h(297,10): message : vea la declaración de ‘QPainter::fillPath’  
1\>Generando código…  
1\>Compilación del proyecto “vtkRenderingQt.vcxproj” terminada – ERROR.  
2\>------ Operación Compilar iniciada: proyecto: vtkmyCommon, configuración: Debug x64 ------  
3\>------ Operación Compilar iniciada: proyecto: vtkmyUnsorted, configuración: Debug x64 ------  
4\>------ Operación Compilar iniciada: proyecto: BalloonWidget, configuración: Debug x64 ------  
5\>------ Operación Compilar iniciada: proyecto: Slider, configuración: Debug x64 ------  
3\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
4\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
3\>Compilación del proyecto “vtkmyUnsorted.vcxproj” terminada – ERROR.  
6\>------ Operación Compilar iniciada: proyecto: QScalarsToColors, configuración: Debug x64 ------  
4\>Compilación del proyecto “BalloonWidget.vcxproj” terminada – ERROR.  
7\>------ Operación Compilar iniciada: proyecto: QChartTable, configuración: Debug x64 ------  
5\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
5\>Compilación del proyecto “Slider.vcxproj” terminada – ERROR.  
8\>------ Operación Compilar iniciada: proyecto: PiecewiseItem, configuración: Debug x64 ------  
2\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
2\>Compilación del proyecto “vtkmyCommon.vcxproj” terminada – ERROR.  
9\>------ Operación Compilar iniciada: proyecto: vtkmyImaging, configuración: Debug x64 ------  
6\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
6\>Compilación del proyecto “QScalarsToColors.vcxproj” terminada – ERROR.  
10\>------ Operación Compilar iniciada: proyecto: Slider2D, configuración: Debug x64 ------  
7\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
7\>Compilación del proyecto “QChartTable.vcxproj” terminada – ERROR.  
11\>------ Operación Compilar iniciada: proyecto: GraphItem, configuración: Debug x64 ------  
8\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
8\>Compilación del proyecto “PiecewiseItem.vcxproj” terminada – ERROR.  
12\>------ Operación Compilar iniciada: proyecto: vtkmyEx2, configuración: Debug x64 ------  
9\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkmyCommon.lib’  
9\>Compilación del proyecto “vtkmyImaging.vcxproj” terminada – ERROR.  
13\>------ Operación Compilar iniciada: proyecto: vtkmyEx1, configuración: Debug x64 ------  
10\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
10\>Compilación del proyecto “Slider2D.vcxproj” terminada – ERROR.  
11\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkRenderingQt-8.2.lib’  
11\>Compilación del proyecto “GraphItem.vcxproj” terminada – ERROR.  
12\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkmyUnsorted.lib’  
12\>Compilación del proyecto “vtkmyEx2.vcxproj” terminada – ERROR.  
13\>LINK : fatal error LNK1104: no se puede abrir el archivo ‘…\lib\Debug\vtkmyUnsorted.lib’  
13\>Compilación del proyecto “vtkmyEx1.vcxproj” terminada – ERROR.  
14\>------ Operación Compilar iniciada: proyecto: INSTALL, configuración: Debug x64 ------  
14\>-- Install configuration: “Debug”  
14\>CMake Error at cmake\_install.cmake:36 (file):  
14\> file INSTALL cannot copy file “C:/vtk/bin/CMakeFiles/VTKConfig.cmake” to  
14\> “C:/Program Files (x86)/VTK/lib/cmake/vtk-8.2/VTKConfig.cmake”: Permission  
14\> denied.  
14\>  
14\>  
14\>-- Installing: C:/Program Files (x86)/VTK/lib/cmake/vtk-8.2/VTKConfig.cmake  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: El comando “setlocal  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: “C:\Program Files\CMake\bin\cmake.exe” -DBUILD\_TYPE=Debug -P cmake\_install.cmake  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmEnd  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmErrorLevel  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: exit /b %1  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmDone  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd  
14\>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :VCEnd” salió con el código 1.  
14\>Compilación del proyecto “INSTALL.vcxproj” terminada – ERROR.  
========== Compilar: 0 correctos, 14 incorrectos, 185 actualizados, 0 omitidos ==========

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [October 22, 2020, 12:24am UTC](https://discourse.vtk.org/t/problem-with-the-installation-of-vtk-and-qt-modules/4464/2 "2020-10-22T00:24:42Z")

</div>

It is all good. You can ignore the install errors, because you don’t need to install VTK.

If you want to install VTK for some reason then set the install prefix path in CMake to a writeable location (the default `C:\Program Files (x86)` location is read-only).

---

<div class="post-metadata">

### Author: ![wangsen53](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wangsen53/32/3147_2.png) [@wangsen53](https://discourse.vtk.org/u/wangsen53)
#### Post date: [March 12, 2021, 5:55am UTC](https://discourse.vtk.org/t/problem-with-the-installation-of-vtk-and-qt-modules/4464/3 "2021-03-12T05:55:24Z")

</div>

1\>C:\vtk\src\Rendering\Qt\vtkQtLabelRenderStrategy.cxx(467,35): message : Uso del tipo no definido ‘QPainterPath’  
Hello!, I get the same problem as you.  
i add #include in the wrong file.  
hope it can help you.

---

<div class="post-metadata">

### Author: ![macky1649](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/df788c/32.png) [@macky1649](https://discourse.vtk.org/u/macky1649)
#### Post date: [July 14, 2021, 2:40am UTC](https://discourse.vtk.org/t/problem-with-the-installation-of-vtk-and-qt-modules/4464/4 "2021-07-14T02:40:50Z")

</div>

I also have encountered same problem. Thanks !! Very helpful info for me!
