[Insight-users] NumericTraits::Zero not found during WrapITK build on Windows XP

Charl P. Botha cpbotha at cpbotha.net
Thu Feb 16 05:03:49 EST 2006

Dear Zach and Gaetan,

After manually adding __stdcall to all the right places in the
generated code, my WrapITK build now breaks at the _ITKCommonAPython
link phase with:

_ITKCommonAPython error LNK2001: unresolved external symbol "public:
static class itk::CovariantVector<float,2> const
itk::NumericTraits<class itk::CovariantVector<float,2> >::Zero"
(?Zero@?$NumericTraits at V?$CovariantVector at M$01 at itk@@@itk@@2V?$CovariantVector at M$01 at 2@B)

and two more times, for CovariantVector<float,3> and RGBPixel<unsigned char>.

"Zero" (the unresolved symbol) is a static const variable of
NumericTraits with type == template type.  Looking at the
itkNumericTraits.cxx, "Zero" is initialised (outside of the class
declaration or definition, as all static member variables should be)
for all basic types (bool, unsigned char, float, double, etc.) but
obviously not for our template types (CovariantVector and RGBPixel).

Could this be part of the build problem under VS.NET 2003?  For
CoviariantVector and RGBPixel, shouldn't NumericTraits::Zero be
initialized somewhere in the generated CXX code?


More information about the Insight-users mailing list