# ITK 5.2.1 static build Win x64

**URL:** https://discourse.itk.org/t/itk-5-2-1-static-build-win-x64/5341
**Category:** Beginner Questions
**Created:** [September 18, 2022, 5:25pm UTC](https://discourse.itk.org/t/itk-5-2-1-static-build-win-x64/5341 "2022-09-18T17:25:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![DL\_I](https://discourse.itk.org/user_avatar/discourse.itk.org/dl_i/32/2942_2.png) [@DL\_I](https://discourse.itk.org/u/DL_I)
#### Post date: [September 18, 2022, 5:25pm UTC](https://discourse.itk.org/t/itk-5-2-1-static-build-win-x64/5341/1 "2022-09-18T17:25:35Z")

</div>

building ITK tag v5.2.1 static in Visual Studio 2020 x64 build environment. I have Qt 5.15.2, VTK 9.1.0 and  
GDCM 3.1.0 built statically debug. ITK is configured to use\_system\_gdcm, shared libs off, no testing,  
no examples.  
I have the following build errors in VS:

238\>ITKRegistrationMethodsv4.vcxproj → C:\code\build\itk\_5.2.1\lib\Debug\ITKRegistrationMethodsv4-5.2.lib  
241\>------ Build started: Project: ITKRegistrationMethodsv4-all, Configuration: Debug x64 ------  
241\>Building Custom Rule C:/code/repository/ITK/Modules/Registration/RegistrationMethodsv4/CMakeLists.txt  
240\>gdcmMSFF.lib(gdcmJPEG8Codec.obj) : error LNK2001: unresolved external symbol “public: static char const \* \_\_cdecl gdcm::System::GetLastSystemError(void)” (?GetLastSystemError@System@gdcm@@SAPEBDXZ)  
240\>gdcmMSFF.lib(gdcmJPEG12Codec.obj) : error LNK2001: unresolved external symbol “public: static char const \* \_\_cdecl gdcm::System::GetLastSystemError(void)” (?GetLastSystemError@System@gdcm@@SAPEBDXZ)  
240\>gdcmMSFF.lib(gdcmJPEG16Codec.obj) : error LNK2001: unresolved external symbol “public: static char const \* \_\_cdecl gdcm::System::GetLastSystemError(void)” (?GetLastSystemError@System@gdcm@@SAPEBDXZ)  
240\>gdcmMSFF.lib(gdcmJPEGLSCodec.obj) : error LNK2001: unresolved external symbol “public: static char const \* \_\_cdecl gdcm::System::GetLastSystemError(void)” (?GetLastSystemError@System@gdcm@@SAPEBDXZ)  
240\>gd

etc.

Any help resolving these errors would be greatly appreciated …

---

<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: [September 19, 2022, 8:03pm UTC](https://discourse.itk.org/t/itk-5-2-1-static-build-win-x64/5341/2 "2022-09-19T20:03:29Z")

</div>

@mathieu.malaterre is GDCM 3.1.0 compatible with ITK 5.2.1?

---

<div class="post-metadata">

### Author: ![DL\_I](https://discourse.itk.org/user_avatar/discourse.itk.org/dl_i/32/2942_2.png) [@DL\_I](https://discourse.itk.org/u/DL_I)
#### Post date: [September 19, 2022, 8:13pm UTC](https://discourse.itk.org/t/itk-5-2-1-static-build-win-x64/5341/3 "2022-09-19T20:13:50Z")

</div>

I managed to get ITK compiled after many iterations of configuring in CMake and  
after fixing a minor GDCM code bug with one of the GDCM vtk classes

---

<div class="post-metadata">

### Author: ![mathieu.malaterre](https://discourse.itk.org/user_avatar/discourse.itk.org/mathieu.malaterre/32/205_2.png) [@mathieu.malaterre](https://discourse.itk.org/u/mathieu.malaterre)
#### Post date: [September 20, 2022, 5:56am UTC](https://discourse.itk.org/t/itk-5-2-1-static-build-win-x64/5341/4 "2022-09-20T05:56:16Z")

</div>

> [@dzenanz](#):
>
> @mathieu.malaterre is GDCM 3.1.0 compatible with ITK 5.2.1?

“3.1.0” refer to the dev branch (odd minor number), so I suspect the rather conservative answer is: “No”.  
Use the release branch, latest release is: 3.0.18
