[ITK] [ITK-dev] BUG: Undefined symbol ImageBase::ImageDimension with clang compiler

K.K. Marstal k.marstal at erasmusmc.nl
Wed Aug 24 06:26:25 EDT 2016


I am using xcode 7.3.1, ITK v4.10, and SimpleITK v0.10.0.

I should clarify that SimpleITK itself compiles and links allright, but the error happens when linking against my own extensions to SimpleITK (https://github.com/kaspermarstal/SimpleElastix). The way itkStaticConstMacro and the ImageDimension is used here here https://github.com/kaspermarstal/elastix/blob/641c83af7f97dfe2397e26e832cdda76e166fd14/src/Core/Main/elxElastixFilter.h#L80-L81 seems to hide the ImageDimension symbol during linking, much in the same way as in the referenced gerrit discussion.

There are workarounds of course, just thought you should know.

Kasper
________________________________
From: Lowekamp, Bradley (NIH/NLM/LHC) [C] [blowekamp at mail.nih.gov]
Sent: Tuesday, August 23, 2016 9:10 PM
To: K.K. Marstal
Cc: insight-developers at itk.org
Subject: Re: [ITK] [ITK-dev] BUG: Undefined symbol ImageBase::ImageDimension with clang compiler

Hello,

Do you have a specific version of SimpleITK and ITK and Xcode which cause this problem?

The current SimpleITK master with Xcode 7.3 seems ok to me.

Brad

On Aug 23, 2016, at 12:04 PM, K.K. Marstal <k.marstal at erasmusmc.nl<mailto:k.marstal at erasmusmc.nl>> wrote:

Hello,

As discussed in this gerrit ticket http://review.source.kitware.com/#/c/20900<http://review.source.kitware.com/#/c/20900/,> the recent change to itkGetStaticConstMacro hides the ImageBase::ImageDimension symbol for linking in some cases. While the problem seemed to have been solved in that particular case, I am getting the same error compiling SimpleITK and linking against the Python wrapper on Mac OS X with GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5) compiler.

The issue is fixed if I change line 780 of itkMacro.h "itkStaticConstMacro(name,type,value) static ITK_CONSTEXPR type name = value" back the version of itk 4.8.2, namely "#define itkStaticConstMacro(name, type, value) enum { name = value }". To clarify, the problem seem to be with ITK, not with SimpleITK.

Kind Regards,
Kasper Marstal
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com/>

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers
_______________________________________________
Community mailing list
Community at itk.org<mailto:Community at itk.org>
http://public.kitware.com/mailman/listinfo/community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160824/62c0789a/attachment-0001.html>
-------------- next part --------------
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers


More information about the Community mailing list