# Trouble with Windows Build (master)

**URL:** https://discourse.paraview.org/t/trouble-with-windows-build-master/11159
**Category:** ParaView Support
**Created:** [January 12, 2023, 4:59pm UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159 "2023-01-12T16:59:26Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Will](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/90ced4/32.png) [@Will](https://discourse.paraview.org/u/Will)
#### Post date: [January 12, 2023, 4:59pm UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/1 "2023-01-12T16:59:27Z")

</div>

I am trying to build ParaView for visualising openCFS outputs, so needing the CFSReader plugin, but am new to using open source software (so might be missing something very obvious). The following issue is coming up for me when following the instructions for Windows on the Building ParaView document. All of the dependencies were met (apart from using Qt 5.15.2 rather than Qt 5.15.3). I also noticed a lot of header files were not found when trying to compile. I would have added the CMakeError text to give a better idea but there was so much it wasn’t feasible. I will show the first bit though - hopefully that will hint towards something.

From the terminal:

```auto
 CMake Warning at VTK/CMake/vtkModule.cmake:4606 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

Could not find a package configuration file provided by "Qt5" (requested
  version 5.9) with any of the following names:

    Qt5Config.cmake
    qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files. If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  VTK/GUISupport/Qt/CMakeLists.txt:43 (vtk_module_find_package)

CMake Error at VTK/CMake/vtkModule.cmake:4612 (message):
  Could not find the Qt5 external dependency.
Call Stack (most recent call first):
  VTK/GUISupport/Qt/CMakeLists.txt:43 (vtk_module_find_package)

```

From the CMakeError file:

```auto
Performing C++ SOURCE FILE Test CMAKE_REQUIRE_LARGE_FILE_SUPPORT failed with the following compile output:
Change Dir: C:/pv/pvb/CMakeFiles/CMakeScratch/TryCompile-nnefef

Run Build Command(s):C:/Windows/ninja.exe cmTC_fd3db && [1/2] Building CXX object CMakeFiles\cmTC_fd3db.dir\src.cxx.obj
FAILED: CMakeFiles/cmTC_fd3db.dir/src.cxx.obj 
C:\PROGRA~2\MICROS~3\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe /nologo /TP -DCMAKE_REQUIRE_LARGE_FILE_SUPPORT /DWIN32 /D_WINDOWS /GR /EHsc /W4 /bigobj /Zi /Ob0 /Od /RTC1 -MDd /showIncludes /FoCMakeFiles\cmTC_fd3db.dir\src.cxx.obj /FdCMakeFiles\cmTC_fd3db.dir\ /FS -c C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(13): warning C4293: '<<': shift count negative or too big, undefined behavior
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(13): warning C4127: conditional expression is constant
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(19): error C3861: 'S_ISREG': identifier not found
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(23): error C3861: 'ftello': identifier not found
C:\pv\pvb\CMakeFiles\CMakeScratch\TryCompile-nnefef\src.cxx(22): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

ninja: build stopped: subcommand failed.

```

Any help on how to proceed would be greatly appreciated.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 12, 2023, 5:12pm UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/2 "2023-01-12T17:12:24Z")

</div>

> [@Will](#):
>
> CFSReader

Hi @Will

For starters, I want to mention that the CFSReader is now part of ParaView and available in the nightly binaries ! Just download the last nightly from [https://www.paraview.org/download/](https://www.paraview.org/download/)

more info here: [About integration of CFSReader](https://discourse.paraview.org/t/about-integration-of-cfsreader/9111)

To fix your error, you need to install Qt5 and set the Qt5\_DIR correctly, see the compilation guide here:  
[https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md#windows](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md#windows)

Hth

---

<div class="post-metadata">

### Author: ![Will](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/90ced4/32.png) [@Will](https://discourse.paraview.org/u/Will)
#### Post date: [January 13, 2023, 3:17pm UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/3 "2023-01-13T15:17:16Z")

</div>

Hi @mwestphal

Thank you for the reply!

I tried to do as you mentioned and take the simpler approach of downloading the nightly binaries from the paraview website. However, while this did give working and fully functioning ParaView program, I couldn’t seem to find CFSReader (be it in the program directories or through the tools and plugins in the program itself). Perhaps I am missing something?

In regards to Qt5, I have it installed on my machine, however, I am not sure what you mean by setting the Qt5\_DIR correctly. I have looked at the guide you linked and it was the same one I have been using but I don’t see where Qt5\_DIR is mentioned.

I noticed that Qt5Config.cmake is located at C:\Qt\5.15.2\msvc2019\_64\lib\cmake\Qt5\Qt5Config.cmake, do you mean to change the CMakeLists.txt in the paraview (pv) directory to have the following?:

> set (Qt5\_DIR "C:\Qt\5.15.2\msvc2019\_64\lib\cmake\Qt5")

Sorry if I am being a bit slow on the uptake, thanks again for the help.

Will

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 13, 2023, 3:34pm UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/4 "2023-01-13T15:34:16Z")

</div>

> [@Will](#):
>
> Perhaps I am missing something?

Available in the nightlies only, which are not available on Windows at the moment.

> I noticed that Qt5Config.cmake is located at C:\Qt\5.15.2\msvc2019\_64\lib\cmake\Qt5\Qt5Config.cmake, do you mean to change the CMakeLists.txt in the paraview (pv) directory to have the following?:

Yes, but do that in cmake-gui instead of modifying paraview.

---

<div class="post-metadata">

### Author: ![Will](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/90ced4/32.png) [@Will](https://discourse.paraview.org/u/Will)
#### Post date: [January 13, 2023, 3:53pm UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/5 "2023-01-13T15:53:56Z")

</div>

Ah okay and thanks!

Out of curiosity, is there a way to implement that through the x64 native tools command prompt? The compilation guide referenced before has:

> cmake -GNinja -DPARAVIEW\_USE\_PYTHON=ON -DPARAVIEW\_USE\_MPI=ON -DVTK\_SMP\_IMPLEMENTATION\_TYPE=STDThread -DCMAKE\_BUILD\_TYPE=Release …\pv

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 13, 2023, 4:12pm UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/6 "2023-01-13T16:12:23Z")

</div>

`cmake -GNinja -DQt5_DIR="C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5" -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=STDThread -DCMAKE_BUILD_TYPE=Release …\pv`

---

<div class="post-metadata">

### Author: ![zjqf](https://discourse.paraview.org/user_avatar/discourse.paraview.org/zjqf/32/11119_2.png) [@zjqf](https://discourse.paraview.org/u/zjqf)
#### Post date: [March 9, 2023, 1:49am UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/7 "2023-03-09T01:49:10Z")

</div>

Thanks for your question, I have the similar trouble for Compiling Paraview. I have done the Qt6.3. When I compiled Paraview, it need Qt5\_DIR. Is there any ways to use Qt6?

---

<div class="post-metadata">

### Author: ![zjqf](https://discourse.paraview.org/user_avatar/discourse.paraview.org/zjqf/32/11119_2.png) [@zjqf](https://discourse.paraview.org/u/zjqf)
#### Post date: [March 9, 2023, 1:51am UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/8 "2023-03-09T01:51:26Z")

</div>

CMake Warning (dev) at D:/app\_run/CMake/share/cmake-3.26/Modules/CMakeDependentOption.cmake:89 (message):  
Policy CMP0127 is not set: cmake\_dependent\_option() supports full Condition  
Syntax. Run “cmake --help-policy CMP0127” for policy details. Use the  
cmake\_policy command to set the policy and suppress this warning.  
Call Stack (most recent call first):  
VTK/Common/Core/CMakeLists.txt:47 (cmake\_dependent\_option)  
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at VTK/CMake/vtkModule.cmake:4628 (find\_package):  
By not providing “FindQt5.cmake” in CMAKE\_MODULE\_PATH this project has  
asked CMake to find a package configuration file provided by “Qt5”, but  
CMake did not find one.

Could not find a package configuration file provided by “Qt5” (requested  
version 5.9) with any of the following names:

```
Qt5Config.cmake
qt5-config.cmake

```

Add the installation prefix of “Qt5” to CMAKE\_PREFIX\_PATH or set “Qt5\_DIR”  
to a directory containing one of the above files. If “Qt5” provides a  
separate development package or SDK, be sure it has been installed.  
Call Stack (most recent call first):  
VTK/GUISupport/Qt/CMakeLists.txt:43 (vtk\_module\_find\_package)

CMake Error at VTK/CMake/vtkModule.cmake:4634 (message):  
Could not find the Qt5 external dependency.  
Call Stack (most recent call first):  
VTK/GUISupport/Qt/CMakeLists.txt:43 (vtk\_module\_find\_package)

---

<div class="post-metadata">

### Author: ![zjqf](https://discourse.paraview.org/user_avatar/discourse.paraview.org/zjqf/32/11119_2.png) [@zjqf](https://discourse.paraview.org/u/zjqf)
#### Post date: [March 9, 2023, 6:30am UTC](https://discourse.paraview.org/t/trouble-with-windows-build-master/11159/9 "2023-03-09T06:30:59Z")

</div>

ok, I solve my problem
