# DLL problem when installing ITK on Windows 10

**URL:** https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626
**Category:** Beginner Questions
**Created:** [February 27, 2019, 9:15pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626 "2019-02-27T21:15:32Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![pfreire](https://discourse.itk.org/user_avatar/discourse.itk.org/pfreire/32/513_2.png) [@pfreire](https://discourse.itk.org/u/pfreire)
#### Post date: [February 27, 2019, 9:15pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/1 "2019-02-27T21:15:32Z")

</div>

Hello, everyone. I’ve been using ITK on Linux for quite some time now (with no problems at all), but lately I’ve been trying to install it on Windows 10… to no avail. I’m using CMake 3.13.4 and when I try to configure the project the error below appears. The DLL itself is properly located in build\Modules\Core\Common\CMakeTmp\ITK\_PRIVATE\_DYNAMIC\_CAST\libbase.dll

I’m clueless. Any hints on how to fix this error? Thank you very much in advance.

 ![Untitled](https://discourse.itk.org/uploads/default/original/1X/774915d1d96845192f4fbe43805551aaa53f3a17.png)

---

<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: [February 27, 2019, 9:30pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/2 "2019-02-27T21:30:18Z")

</div>

Hi @pfreire,

Windows has some path length issues. Can you try to compile ITK in a folder like `c:\D\ITK-build" (with the source tree also in a path similar in length (e.g. c:\D\ITK)?

Hopefully it will solve your problem.

---

<div class="post-metadata">

### Author: ![pfreire](https://discourse.itk.org/user_avatar/discourse.itk.org/pfreire/32/513_2.png) [@pfreire](https://discourse.itk.org/u/pfreire)
#### Post date: [February 27, 2019, 9:51pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/3 "2019-02-27T21:51:07Z")

</div>

Thanks, @fbudin. I tried doing that and the error still persists, unfortunately.

---

<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: [February 27, 2019, 11:08pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/4 "2019-02-27T23:08:12Z")

</div>

@dzenanz @pfreire seems to be using MSYS Makefiles. Have you tried this recently?

---

<div class="post-metadata">

### Author: ![pfreire](https://discourse.itk.org/user_avatar/discourse.itk.org/pfreire/32/513_2.png) [@pfreire](https://discourse.itk.org/u/pfreire)
#### Post date: [February 28, 2019, 12:10am UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/5 "2019-02-28T00:10:05Z")

</div>

Indeed I’m using MSYS. Should I try something different?

---

<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: [February 28, 2019, 1:26am UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/6 "2019-02-28T01:26:12Z")

</div>

I haven’t had any problem using MS Visual Studio 2017. You could try that if that is an option for you (the community edition is free). That being said, we probably need to test the compilation with your system too.

---

<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: [February 28, 2019, 1:22pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/7 "2019-02-28T13:22:32Z")

</div>

I was not able to reproduce your problem locally. What compiler are you using? What version of Mingw are you using? I installed Mingw on my Windows system yesterday, and ITK configured properly. The only flag I changed in CMake was BUILD\_SHARED since I could see in your configuration that you did that too. Did you change more flags than just that?

---

<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: [February 28, 2019, 1:26pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/8 "2019-02-28T13:26:05Z")

</div>

As a side note, I tried two things in parallel yesterday:

- Using the MSys Makefiles
- Using Ninja as my generator

Everything configures and generates properly with either solution. ~~I am running into a small problem (nothing happens when running `make` with MSys Makefiles), but this is likely due to a problem in my PATH setting. Running `ninja` seems to compile ITK without any problem.~~ The compilation starts normally for both, but fails on KWSys. So going back to my original advice: if possible, use Visual Studio which is tested.

---

<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: [February 28, 2019, 3:07pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/9 "2019-02-28T15:07:31Z")

</div>

I don’t think I ever used “MSYS Makefiles” generator. I use Visual Studio and Ninja generators. I know that MINGW is an [exotic](https://open.cdash.org/index.php?project=Insight#!#Expected_Nightly_Exotic) platform for ITK.

---

<div class="post-metadata">

### Author: ![pfreire](https://discourse.itk.org/user_avatar/discourse.itk.org/pfreire/32/513_2.png) [@pfreire](https://discourse.itk.org/u/pfreire)
#### Post date: [February 28, 2019, 3:39pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/10 "2019-02-28T15:39:01Z")

</div>

Thank you for your help, @fbudin. I’ll try using VS when I get home and I’ll keep you posted!

---

<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: [February 28, 2019, 5:07pm UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/11 "2019-02-28T17:07:59Z")

</div>

Update as a note to self: I uninstall the old version of `mingw` I had originally installed and installed a newer version by installing `mysys2`. It only moves the compilation error to the TIFF library.

---

<div class="post-metadata">

### Author: ![pfreire](https://discourse.itk.org/user_avatar/discourse.itk.org/pfreire/32/513_2.png) [@pfreire](https://discourse.itk.org/u/pfreire)
#### Post date: [March 1, 2019, 12:10am UTC](https://discourse.itk.org/t/dll-problem-when-installing-itk-on-windows-10/1626/12 "2019-03-01T00:10:24Z")

</div>

Hey @fbudin and @dzenanz, I was able to successfully configure, generate and build ITK using VS. Thank you for your support!
