Strange compiler error with g++ 3.3
Peter Cech
pcech@vision.ee.ethz.ch
Mon Jan 24 14:20:00 GMT 2005
Hi!
Currently I fell over this problem with g++ 3.3.5:
/home/peter/work/ventricles/src/multires_moment_filter.txx:252: error: prototype
for `void MultiresMomentFilter<TInputImage,
TOutputImage>::compute_moment(typename itk::ImageToImageFilter<TInputImage,
TOutputImage>::InputImageType*, typename
itk::ImageToImageFilter<TInputImage, TOutputImage>::OutputImageType*, const
itk::FixedArray<std::vector<float, std::allocator<float> >, 3>&, const
itk::FixedArray<unsigned int, MultiresMomentFilter<TInputImage,
TOutputImage>::InputImageDimension>&)' does not match any in class `
MultiresMomentFilter<TInputImage, TOutputImage>'
/home/peter/work/ventricles/src/multires_moment_filter.h:71: error: candidate
is: void MultiresMomentFilter<TInputImage,
TOutputImage>::compute_moment(typename itk::ImageToImageFilter<TInputImage,
TOutputImage>::InputImageType*, typename
itk::ImageToImageFilter<TInputImage, TOutputImage>::OutputImageType*, const
itk::FixedArray<std::vector<float, std::allocator<float> >, 3>&, const
itk::FixedArray<unsigned int, MultiresMomentFilter<TInputImage,
TOutputImage>::InputImageDimension>&)
/home/peter/work/ventricles/src/multires_moment_filter.txx:252: error: template
definition of non-template `void MultiresMomentFilter<TInputImage,
TOutputImage>::compute_moment(typename itk::ImageToImageFilter<TInputImage,
TOutputImage>::InputImageType*, typename
itk::ImageToImageFilter<TInputImage, TOutputImage>::OutputImageType*, const
itk::FixedArray<std::vector<float, std::allocator<float> >, 3>&, const
itk::FixedArray<unsigned int, MultiresMomentFilter<TInputImage,
TOutputImage>::InputImageDimension>&)'
Seems like gcc fails to recognize the protoype of method (but offers it
as a candidate). Did I hit some limitation/bug in g++ 3.3? With g++ 3.4
it compiles.
An obvious solution would be to use g++ 3.4, but one of the libraries
I use (nurbs++, http://libnurbs.sf.net) needs a lot of fixing to compile
with g++ 3.4. Is there a way around this bug with g++ 3.3?
Thanks in advance!
Peter Cech
PS: I put the sources that generate this error here:
http://www.vision.ee.ethz.ch/~pcech/bugreports/GCC-20050124/
More information about the Gcc
mailing list