DLL problem when installing ITK on Windows 10


(Paulo Freire) #1

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.


(Francois Budin) #2

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.


(Paulo Freire) #3

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


(Francois Budin) #4

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


(Paulo Freire) #5

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


(Francois Budin) #6

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.


(Francois Budin) #7

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?


(Francois Budin) #8

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.


(Dženan Zukić) #9

I don’t think I ever used “MSYS Makefiles” generator. I use Visual Studio and Ninja generators. I know that MINGW is an exotic platform for ITK.


(Paulo Freire) #10

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


(Francois Budin) #11

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.


(Paulo Freire) #12

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