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

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Feb 16 07:12:21 EST 2006


On Thu, 16 Feb 2006 11:03:49 +0100, Charl P. Botha <cpbotha at cpbotha.net>  
wrote:

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

Unless I'm completely wrong, Zero is declared in  
itkNumericTraitsCovariantVectorPixel.h, and is  initialized in  
itkNumericTraitsCovariantVectorPixel.cxx for type CovariantVector<float,2>.
This code should be in ITKCommon shared library.
Can you give the command line of the linker ?

> 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?
>
> Regards,
> Charl



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-users mailing list