[Insight-developers] ITK with Python wrapping yielding build error on gcc 2.95.4 (Debian 3.0)

Luis Ibanez luis.ibanez at kitware.com
Wed Jul 14 10:28:39 EDT 2004


Charl,

We could actually name this namespace in any other way.

The symbol is used only when defining Images with pixel
types that are vectors. We could simply call it "itkvector"
and replace the correspoinding lines on the following
instantiations of the itk::Image<>

Could you plese give it a try to this change and let us
know how it goes ?


   Thanks


     Luis


-----------------------
Charl P. Botha wrote:
> Building the latest ITK CVS on Debian 3.0 with gcc 2.95.4, I get the 
> following error:
> 
> In file included from 
> /home/cpbotha/DoNotBackup/build/Insight-HEAD/Wrapping/CSwi
> g/Common/wrap_ITKInterpolators.cxx:24:
> /home/cpbotha/DoNotBackup/build/Insight-HEAD/Wrapping/CSwig/itkCSwigImages.h:31: 
> 
>  error: `
>    vector' redeclared as different kind of symbol
> /usr/include/g++-3/stl_vector.h:153: error: previous declaration of `
>    template<class _Tp, class _Alloc> class vector'
> 
> Checking itkCSwigImage.h at line 31, we have the following:
> namespace vector
> {
>   typedef itk::Vector< float,  2>  F2;
>   typedef itk::Vector< float,  3>  F3;
>   typedef itk::Vector< double, 2>  D2;
>   typedef itk::Vector< double, 3>  D3;
> }
> 
> Is the compiler supposed to support the re-use of "vector" as a 
> namespace?  It seems that 2.95 doesn't like this... does anyone have a 
> possible work-around?
> 
> Thanks,
> charl
> 





More information about the Insight-developers mailing list