[Insight-developers] Explicit Instantiation

Hans Johnson hans-johnson at uiowa.edu
Fri May 19 15:53:14 EDT 2006


Hello Experts,

I am trying to build with explicit instantiation on gcc 3.4.5 under  
linux (RHEL4).

I am getting the following error:

/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h: In instantiation of `const unsigned int  
itk::ImageRegion<2u>::SliceDimension':
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85:   instantiated from `itk::ImageRegion<2u>'
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
Templates/itkImageRegion2.h:4:   instantiated from here
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85: error: explicit instantiation of  
`itk::ImageRegion<2u>::SliceDimension' but no definition available
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h: In instantiation of `const unsigned int  
itk::ImageRegion<3u>::SliceDimension':
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85:   instantiated from `itk::ImageRegion<3u>'
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
Templates/itkImageRegion3.h:4:   instantiated from here
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85: error: explicit instantiation of  
`itk::ImageRegion<3u>::SliceDimension' but no definition available
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h: In instantiation of `const unsigned int  
itk::ImageRegion<2u>::SliceDimension':
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85:   instantiated from `itk::ImageRegion<2u>'
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
Templates/itkImageRegion2.h:4:   instantiated from here
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85: error: explicit instantiation of  
`itk::ImageRegion<2u>::SliceDimension' but no definition available
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h: In instantiation of `const unsigned int  
itk::ImageRegion<3u>::SliceDimension':
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85:   instantiated from `itk::ImageRegion<3u>'
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
Templates/itkImageRegion3.h:4:   instantiated from here
/scratch/hjohnson/src/brains3/iplFreeware/Insight/Code/Common/ 
itkImageRegion.h:85: error: explicit instantiation of  
`itk::ImageRegion<3u>::SliceDimension' but no definition available


I believe that the problem is that the itk::ImageRegion<Dimension>  
recursively depends on itk::ImageRegion<Dimension-1>, and that the  
explicit instantiation mechanism does not support such cascading  
definitions yet.

Any ideas?

Thanks,
Hans



More information about the Insight-developers mailing list