Build error: VTK 9.5.2, Debug/Win32, MSVC 14.44.35207 (Visual Studio 2022 17)

Hi,

I tried to build VTK 9.5.2 for Win32/x86, but the build failed.
The same configuration builds VTK 9.4.1 successfully.

260203_build_vtk9.5.2_x86_msvs_output__2 target failed_1.txt (565.0 KB)

Cmake settings

CMAKE_AR
C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207

CMAKE_CONFIGURATION_TYPES
Debug

Error

34>C:\Users\f\built\libs\vtk\260203_vtk_9.5.2\ThirdParty\libharu\vtklibharu\src\hpdf_pdfa.c(148,1): error C2373: 'vtklibharu_HPDF_PDFA_SetPDFAConformance': redefinition; different type modifiers
34>    C:\Users\f\built\libs\vtk\260203_vtk_9.5.2\ThirdParty\libharu\vtklibharu\include\hpdf_pdfa.h(35,1):
34>    see declaration of 'vtklibharu_HPDF_PDFA_SetPDFAConformance'

Also many warnings - I guess because targeting x86

warning C4244: ‘initializing’: conversion from ‘int64_t’ to ‘size_t’, possible loss of data

Any idea how to fix this ?

Thanks

This issue with VTK 9.5.x is specific to 32-bit builds. It should be fixed in VTK 9.6.0. See gitlab issue #19765 for additional details.

1 Like

Thanks for the clarification and the link. I’m getting back to VTK after a few years, so I need a bit of time to figure out where to look for answers.