# How to import unreal engine?

**URL:** <https://discourse.itk.org/t/how-to-import-unreal-engine/7197>\
**Category:** Beginner Questions\
**Tags:** itk\
**Created:** [August 29, 2024, 6:45am UTC](https://discourse.itk.org/t/how-to-import-unreal-engine/7197 "2024-08-29T06:45:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sleighmaster](https://discourse.itk.org/user_avatar/discourse.itk.org/sleighmaster/32/4356_2.png) [@sleighmaster](https://discourse.itk.org/u/sleighmaster)\
**Post date:** [August 29, 2024, 6:45am UTC](https://discourse.itk.org/t/how-to-import-unreal-engine/7197/1 "2024-08-29T06:45:55Z")

</div>

I’m trying to use ITK to read dcm files from Unreal Engine.

After cmake, I built AllBuild in release mode. I then built the Insertall project and added it to the directory where the Unreal project is located.  
The cmake setting modified CMAKE\_INSTALL\_PREFIX to copy files anywhere you wanted when building an Install project.  
I think the header and lib files have all been added normally.

# However, when I build an Unreal project, you get the following error.

[Error]  
D:\ITKPluginTest\ExternalLib\ITK\Build\include\ITK-6.0\itkeigen\Eigen\src\Core\util\Memory.h(153): error C3861: ‘assert’: identifier not found

D:\ITKPluginTest\ExternalLib\ITK\Build\include\ITK-6.0\itkeigen\Eigen\src\Core\util\Memory.h(220): error C3861: ‘assert’: identifier not found

D:\ITKPluginTest\ExternalLib\ITK\Build\include\ITK-6.0\itkeigen\Eigen\src\Core\MathFunctions.h(1361): error C3861: ‘assert’: identifier not found

======================================

Does anyone know why that error is happening and how to fix it?

The development environment is as follows.  
Window10  
Visual Studio 2022

---

<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:** [August 29, 2024, 4:49pm UTC](https://discourse.itk.org/t/how-to-import-unreal-engine/7197/2 "2024-08-29T16:49:54Z")

</div>

`assert` is defined in header `<cassert>`. Maybe that include is missing somewhere? More likely there is something wrong with your build system.

---

<div class="post-metadata">

**Author:** ![sleighmaster](https://discourse.itk.org/user_avatar/discourse.itk.org/sleighmaster/32/4356_2.png) [@sleighmaster](https://discourse.itk.org/u/sleighmaster)\
**Post date:** [August 30, 2024, 1:03am UTC](https://discourse.itk.org/t/how-to-import-unreal-engine/7197/3 "2024-08-30T01:03:42Z")

</div>

Thank you for your help.

I don’t think the file is missing because there was no problem when I only built ITK itself.

An error occurred in the eigen\_assert macro when looking at the code where the error occurred.

Unreal Engine is also using Eigen, is there any chance of crashing if I library ITK?

---

<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:** [August 30, 2024, 1:51pm UTC](https://discourse.itk.org/t/how-to-import-unreal-engine/7197/4 "2024-08-30T13:51:50Z")

</div>

If so, I suggest turning on `ITK_USE_SYSTEM_EIGEN`, then setting `EIGEN_DIR` to the same one Unreal uses. It will probably not matter for crashing, as you are not trying to transfer some eigen classes between ITK and Unreal libraries.

---

<div class="post-metadata">

**Author:** ![sleighmaster](https://discourse.itk.org/user_avatar/discourse.itk.org/sleighmaster/32/4356_2.png) [@sleighmaster](https://discourse.itk.org/u/sleighmaster)\
**Post date:** [November 22, 2024, 5:55am UTC](https://discourse.itk.org/t/how-to-import-unreal-engine/7197/5 "2024-11-22T05:55:46Z")

</div>

It took a long time to solve this problem.  
As a result, integrating it into Unreal as the original code of ITK was problematic, so I quit.  
It was confirmed that if some functions did not return the address when giving the return value, the value would not be received normally when crossing the dll.  
I would like to know if there are any corrections or future plans regarding these issues.

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:** [November 22, 2024, 2:21pm UTC](https://discourse.itk.org/t/how-to-import-unreal-engine/7197/6 "2024-11-22T14:21:50Z")

</div>

I am afraid mixing different versions of the same library is a general problem, and not specific to ITK or Eigen.
