# Undefined reference to image registers

**URL:** https://discourse.itk.org/t/undefined-reference-to-image-registers/3717
**Category:** Beginner Questions
**Created:** [December 19, 2020, 4:40am UTC](https://discourse.itk.org/t/undefined-reference-to-image-registers/3717 "2020-12-19T04:40:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rohit\_inippully](https://discourse.itk.org/user_avatar/discourse.itk.org/rohit_inippully/32/2056_2.png) [@rohit\_inippully](https://discourse.itk.org/u/rohit_inippully)
#### Post date: [December 19, 2020, 4:40am UTC](https://discourse.itk.org/t/undefined-reference-to-image-registers/3717/1 "2020-12-19T04:40:25Z")

</div>

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

 ![itk_error](https://discourse.itk.org/uploads/default/original/2X/a/a6c1b4df51f6c2358f61346d6f1c852c534f9afd.png)

Thank you,  
Rohit Inippully.

---

<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: [December 21, 2020, 3:12pm UTC](https://discourse.itk.org/t/undefined-reference-to-image-registers/3717/2 "2020-12-21T15:12:45Z")

</div>

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 .`)?

---

<div class="post-metadata">

### Author: ![rohit\_inippully](https://discourse.itk.org/user_avatar/discourse.itk.org/rohit_inippully/32/2056_2.png) [@rohit\_inippully](https://discourse.itk.org/u/rohit_inippully)
#### Post date: [December 22, 2020, 12:48pm UTC](https://discourse.itk.org/t/undefined-reference-to-image-registers/3717/3 "2020-12-22T12:48:24Z")

</div>

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

---

<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: [December 22, 2020, 2:52pm UTC](https://discourse.itk.org/t/undefined-reference-to-image-registers/3717/4 "2020-12-22T14:52:44Z")

</div>

You also need to [configure your example using CMake](https://itk.org/Wiki/ITK/HelloInsight). If you are already doing this, can you share your `CMakeLists.txt`.

---

<div class="post-metadata">

### Author: ![rohit\_inippully](https://discourse.itk.org/user_avatar/discourse.itk.org/rohit_inippully/32/2056_2.png) [@rohit\_inippully](https://discourse.itk.org/u/rohit_inippully)
#### Post date: [December 22, 2020, 4:05pm UTC](https://discourse.itk.org/t/undefined-reference-to-image-registers/3717/5 "2020-12-22T16:05:19Z")

</div>

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.
