ITK 5.2.1 static build Win x64

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 …

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

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

1 Like

“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

1 Like