Build error: undefined reference

I have configured the ITK5.1.0 with cmake-gui and generated the makefile successfully. I use Qt5.12.4. CMAKE_BUILD_TYPE I select is Debug. The VTK library I link is 9.0.1 with Debug. I check the option Module_ITKVtkGlue, BUILD_SHARED_LIBS in cmake. Now I’m building ITK with mingw32-make install command in windows 10 console. I meet the following error:

It seems to have wrong with libitkvnl_algo-5.1.dll in third-party library. Can anyone give me some tips? Thanks in advance.

If it was a clean (not incremental) configure/build, you could try ITK 5.1.1. But I don’t remember whether ITK was building cleanly with mingw. Maybe only mingw64?

Thank you for your advice. I have given up using mingw after too many times building failures. I clone the latest source code from the git and change to use MSVC compiler to build and install ITK by Visual Studio 2019 successfully. Now my demo app runs correctly in Qt Creator with MSVC compiler and debugger, instead of mingw. (Considering of cross-platform, I have to use different .pro project file with different compiler.) And it also seems to work smoothly with VTK9.0.1 by using itkVtkGlue. :grinning:

P.S. The post you replied (Error in ITK compilation with wingw32-make) is really useful. Thanks!

1 Like