# VTK build fails on Windows in Debug mode

**URL:** <https://discourse.slicer.org/t/vtk-build-fails-on-windows-in-debug-mode/42590>\
**Category:** Development\
**Tags:** build, vtk\
**Created:** [April 16, 2025, 9:04pm UTC](https://discourse.slicer.org/t/vtk-build-fails-on-windows-in-debug-mode/42590 "2025-04-16T21:04:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ungi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ungi/32/78573_2.png) [@ungi](https://discourse.slicer.org/u/ungi)\
**Post date:** [April 16, 2025, 9:04pm UTC](https://discourse.slicer.org/t/vtk-build-fails-on-windows-in-debug-mode/42590/1 "2025-04-16T21:04:33Z")

</div>

Hi, I followed the Slicer build instructions today on Windows with default CMake options. The Release build went well with no errors. But in Debug mode, one project from VTK resulted in a link error. Looks like the resulting binary would exceed the maximum size. Slicer couldn’t be build because of the dependencies.

| Severity | Code | Description | Project | File | Line | Suppression State | Details |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Error | LNK1248 | image size (1044EE70F) exceeds maximum allowable size (FFFFFFFF) | CommonCore-objects | C:\D\SD\VTK-build\Common\Core\CommonCore-objects.dir\Debug\CommonCore-objects.lib | 1 | | |

---

<div class="post-metadata">

**Author:** ![ungi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ungi/32/78573_2.png) [@ungi](https://discourse.slicer.org/u/ungi)\
**Post date:** [April 17, 2025, 12:03am UTC](https://discourse.slicer.org/t/vtk-build-fails-on-windows-in-debug-mode/42590/2 "2025-04-17T00:03:28Z")

</div>

@lassoan suggested to revert to the previous VTK version. With this setting in CMake, the build was successful: Slicer\_VTK\_VERSION\_MINOR=2

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 20, 2025, 2:28am UTC](https://discourse.slicer.org/t/vtk-build-fails-on-windows-in-debug-mode/42590/3 "2025-04-20T02:28:32Z")

</div>

I could reproduce this issue independently from Slicer and determined what the root cause is. It is purely a VTK problem, so I’ve posted more details about this on the VTK forum:

> **[VTK 9.4 debug build fails with MSVC due to "image size ... exceeds maximum...](https://discourse.vtk.org/t/vtk-9-4-debug-build-fails-with-msvc-due-to-image-size-exceeds-maximum-allowable-size/15520)**
>
> Debug build of VTK-9.4 fail on Windows if VTK\_ENABLE\_KITS is enabled, with this error: CommonCore-objects.dir\\Debug\\CommonCore-objects.lib : fatal error LNK1248: image size (10098384C) exceeds maximum allowable size (FFFFFFFF)...
