# ITK added to vcpkg

**URL:** https://discourse.itk.org/t/itk-added-to-vcpkg/391
**Category:** Announcements
**Tags:** vcpkg
**Created:** [November 4, 2017, 5:14pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391 "2017-11-04T17:14:41Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 4, 2017, 5:14pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391/1 "2017-11-04T17:14:42Z")

</div>

ITK has just been [added](https://github.com/Microsoft/vcpkg/pull/1957) to vcpkg. Caveats: the configuration is non-default, and a sample project relying on it wouldn’t build in debug mode. If you know how to improve that, don’t be shy!

[vcpkg](https://github.com/Microsoft/vcpkg) is Microsoft’s open source C/C++ package management system for Visual Studio 2015 and 2017.

Why don’t you give it a try and provide feedback?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [December 14, 2017, 8:31pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391/2 "2017-12-14T20:31:13Z")

</div>

An updated and improved port of ITK to `vcpkg` is ready for testing. In this update, both debug and release modes are working OK for a simple test application. All the default modules, and a few extra modules are built. Get it from this [pull request](https://github.com/Microsoft/vcpkg/pull/2376).

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [December 21, 2017, 9:02pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391/3 "2017-12-21T21:02:21Z")

</div>

That pull request has been merged! ITK 4.13.0 is now available through **vcpkg**. Caveat: you must not have **hdf5** installed through vcpkg.

---

<div class="post-metadata">

### Author: ![sarthakpati](https://discourse.itk.org/user_avatar/discourse.itk.org/sarthakpati/32/383_2.png) [@sarthakpati](https://discourse.itk.org/u/sarthakpati)
#### Post date: [June 20, 2018, 7:16pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391/4 "2018-06-20T19:16:01Z")

</div>

> [@dzenanz](#):
>
> Caveat: you must not have **hdf5** installed through vcpkg.

Hey @dzenanz, thanks for the awesome work there! I am using the template in the vcpkg repo right now to generate builds for a recipe I need for my project but I am getting the following error:

```
Failed to get the hash for ${git_repo}

```

You can find more details on my issue: [Remote Modules in ports · Issue #3684 · microsoft/vcpkg · GitHub](https://github.com/Microsoft/vcpkg/issues/3684)

---

<div class="post-metadata">

### Author: ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)
#### Post date: [June 21, 2018, 12:11pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391/5 "2018-06-21T12:11:08Z")

</div>

I have created an updated PR to improve that but it has not been merged:

> <https://github.com/Microsoft/vcpkg/pull/3425>

---

<div class="post-metadata">

### Author: ![sarthakpati](https://discourse.itk.org/user_avatar/discourse.itk.org/sarthakpati/32/383_2.png) [@sarthakpati](https://discourse.itk.org/u/sarthakpati)
#### Post date: [June 21, 2018, 1:44pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391/6 "2018-06-21T13:44:01Z")

</div>

Hi @fbudin, thanks for that information. I don’t see any particular change to the remote module handling routine in your fork. Have you tried building some of them (for instance, ITKReview)? I am not sure why but any time I enable a remote module, I get the error described above.

---

<div class="post-metadata">

### Author: ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)
#### Post date: [June 21, 2018, 9:19pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391/7 "2018-06-21T21:19:08Z")

</div>

I added -DITKReview=ON and -DModule\_IsotropicWavelets=ON to the configuration file and it seems to work until a linking error late in the compilation:

```auto
lib/libITKIOPNG-4.13.a(itkPNGImageIO.cxx.o):itkPNGImageIO.cxx:function itkPNGWriteErrorFunction: error: undefined reference to 'png_set_longjmp_fn'
lib/libITKIOPNG-4.13.a(itkPNGImageIO.cxx.o):itkPNGImageIO.cxx:function itk::(anonymous namespace)::wrapSetjmp(png_struct_def*&) [clone .isra.10]: error: undefined reference to 'png_set_longjmp_fn'

```

But I don’t think the error is related to the new CMake flags. Also, it only fails in Release, not in Debug.

---

<div class="post-metadata">

### Author: ![sarthakpati](https://discourse.itk.org/user_avatar/discourse.itk.org/sarthakpati/32/383_2.png) [@sarthakpati](https://discourse.itk.org/u/sarthakpati)
#### Post date: [June 22, 2018, 2:46pm UTC](https://discourse.itk.org/t/itk-added-to-vcpkg/391/8 "2018-06-22T14:46:40Z")

</div>

[install-x64-windows-dbg-out.log](https://discourse.itk.org/uploads/default/original/1X/2c35246cca1dd1031d4f7ea1adbc7cf5cc74eda5.log) (2.8 MB)

Hi @fbudin, thanks for the response. I tried using the exact recipe as the port (the only distinction is that I need DCMTK, for which I have a vcpkg recipe) and I am getting an error with ITKIOHDF5 (see line 7207 of the attached build report from vcpkg).
