Undefined reference to image registers

Hey,
I am getting an error when compiling the examples given in the itk software guide. Can anyone advise me how to fix this?

Thank you,
Rohit Inippully.

On first invocation of make it build successfully? Are you using CMake? Can you provide the full log, from git clone all the way to the failing make (or preferably cmake --build .)?

Dear Dzenan,

I have no trouble installing ITK.
I am facing this issue when I am going through the examples given in the software guide. As soon as I include itkImageFileReader.h or itkImageFileWriter.h this error shows up. Has anyone else had this issue?

Thank you

You also need to configure your example using CMake. If you are already doing this, can you share your CMakeLists.txt.

Dear Dzenan,
It was a mistake in my CMakeLists.txt file.
I had not included these lines:

cmake_minimum_required(VERSION 3.13)

if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

Its working compiling now.’
Thank you.

1 Like