Name mangling for the Eigen library

Does ITK mangle the symbols in the Eigen 3rd party library it includes?

The initial paragraph in this file states that it does the mangling to avoid conflicts with other copies of the Eigen library in the same process:

but the bullet points do not explicitly state how the mangling is done.

I see references to an “itkeigen” namespace in a comment in the the raw view of the above README, and also elsewhere:
https://gitlab.kitware.com/phcerdan/eigen/-/blob/for/itk_backup/README.kitware.md

Can anyone confirm that ITK does the mangling for the Eigen library?

Thanks.

@phcerdan could best answer this.

It doesn’t. Eigen is a header only library and it wasn’t mangled to facilitate bridging with external libraries using native Eigen.

If you are using your own Eigen for your application, you can share it with ITK building with ITK_USE_SYSTEM_EIGEN:BOOL=ON and pointing to your desired Eigen with the CMake option: Eigen3_DIR:PATH

Hope it helps.

2 Likes