[Insight-users] compilation error with g++-4.0

Amadeus W. M. amadeus84 at cablespeed.com
Wed Jul 6 22:41:22 EDT 2005


Trying to compile VTK to begin with, on a newly installed Fedora Core 4
with g++-4.0 and I'm getting this sort of errors (which I expect to see in
itk too):

/home/silviu/Insight-2.0.1/VTK/IO/vtkBMPReader.cxx: In function 'void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = double]':
/home/silviu/Insight-2.0.1/VTK/IO/vtkBMPReader.cxx:545:   instantiated from here/home/silviu/Insight-2.0.1/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../../include/c++/4.0.0/bits/postypes.h:175: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t]
/home/silviu/Insight-2.0.1/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: operator+(std::streamoff, long int) <built-in>

g++-4.0 is supposed to be much closer to the c++ standard, and definitely
pickier than previous versions. I looked at the code, but I have no idea
what "these" can be ambiguous.

Thanks!





More information about the Insight-users mailing list