# Build error when building SlicerVMTK extension

**URL:** <https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383>\
**Category:** Development\
**Tags:** extensions-manager\
**Created:** [July 4, 2023, 4:44am UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383 "2023-07-04T04:44:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul.w](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@paul.w](https://discourse.slicer.org/u/paul.w)\
**Post date:** [July 4, 2023, 4:44am UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/1 "2023-07-04T04:44:11Z")

</div>

Build error raised when building SlicerVMTK extension [SlicerExtension-VMTK](https://github.com/vmtk/SlicerExtension-VMTK) within VS2022, the error code shows below:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/4/a4368a0a17dc11eab86de7fe91e80cf9d7dbbb7c.png)

The Slicer 5.3.0 has been successfully built with Release, thus the environment should be okay, which is Win11 64bit (Windows SDK version 10.0.22000.0 to target Windows 10.0.22621) + VS2022 Community + CMake 3.24.3 + C compiler (MSVC 19.36.32535.0)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 4, 2023, 2:50pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/2 "2023-07-04T14:50:28Z")

</div>

What commit did you use for Slicer and what commit and repo did you used for SlicerVMTK?

---

<div class="post-metadata">

**Author:** ![paul.w](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@paul.w](https://discourse.slicer.org/u/paul.w)\
**Post date:** [July 4, 2023, 2:58pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/3 "2023-07-04T14:58:21Z")

</div>

Slicer is the commit 30c31182ad6587117e79af5352fa6f22f38e998b, and SlicerVMTK is the commit cac7b299fae7a1f8115a770d6d0cb57c08952145

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [July 4, 2023, 3:07pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/4 "2023-07-04T15:07:43Z")

</div>

Xref

> [@VMTK extension fails to build for preview](https://discourse.slicer.org/t/vmtk-extension-fails-to-build-for-preview/30355/2):
>
> Thank you for reporting. We’ve noticed this, too, and working on a fix. I expect it will work again by the end of this week.

---

<div class="post-metadata">

**Author:** ![paul.w](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@paul.w](https://discourse.slicer.org/u/paul.w)\
**Post date:** [July 4, 2023, 3:07pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/5 "2023-07-04T15:07:44Z")

</div>

I checked the build process, the error is caused by the D:\Codes\SlicerVMTK\_bin\VMTK\vtkVmtk\Misc codes, if I don’t build the Misc folder by commenting in the CMakeList, the build can succeed, but when Misc is missing, VMTK will not be fully functional. Hence I assumed there are some bugs with the codes of the Misc folder.

---

<div class="post-metadata">

**Author:** ![paul.w](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@paul.w](https://discourse.slicer.org/u/paul.w)\
**Post date:** [July 4, 2023, 3:13pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/6 "2023-07-04T15:13:27Z")

</div>

Thanks. How can I work with SlicerVMTK by now?

Should I downgrade Slicer to 4.xx version, maybe the latest Slicer can not work well with the SlicerVMTK (somewhat old).

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [July 4, 2023, 3:17pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/7 "2023-07-04T15:17:34Z")

</div>

SlicerVMTK is showing no build errors with latest Slicer stable (5.2.2). You can download Slicer stable from [https://download.slicer.org/](https://download.slicer.org/) and install the SlicerVMTK extension using the Extensions Manager (see [instructions](https://slicer.readthedocs.io/en/latest/user_guide/extensions_manager.html#install-extensions)).

[https://slicer.cdash.org/index.php?project=SlicerStable&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=VMTK](https://slicer.cdash.org/index.php?project=SlicerStable&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=VMTK)

---

<div class="post-metadata">

**Author:** ![paul.w](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@paul.w](https://discourse.slicer.org/u/paul.w)\
**Post date:** [July 4, 2023, 3:20pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/8 "2023-07-04T15:20:48Z")

</div>

Cool, I will have a try

---

<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:** [July 4, 2023, 3:36pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/9 "2023-07-04T15:36:43Z")

</div>

The VMTK extension build error has been [fixed](https://github.com/vmtk/SlicerExtension-VMTK/commit/48a071a88de626dc305134a1ac6e252fe0d5bed9). The VMTK extension should be available again in Slicer Preview Releases from tomorrow.

---

<div class="post-metadata">

**Author:** ![paul.w](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@paul.w](https://discourse.slicer.org/u/paul.w)\
**Post date:** [July 4, 2023, 5:35pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/10 "2023-07-04T17:35:26Z")

</div>

Bravo! The build passed with Slicer 5.3.0

---

<div class="post-metadata">

**Author:** ![paul.w](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@paul.w](https://discourse.slicer.org/u/paul.w)\
**Post date:** [July 4, 2023, 5:37pm UTC](https://discourse.slicer.org/t/build-error-when-building-slicervmtk-extension/30383/11 "2023-07-04T17:37:39Z")

</div>

With VMTK 13c270693e9a808019f37f0d2794cb90ff43b2e0
