Compile Error - g++ 3.4.3
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When compiling with g++-3.4.3, errors like this occur:
Building object file vtkBMPReader.o... /local/packages/VTK/IO/vtkBMPReader.cxx: In function `void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = double]': /local/packages/VTK/IO/vtkBMPReader.cxx:545: instantiated from here /local/packages/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/3.4.3/../../../../include/c++/3.4.3/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /local/packages/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: operator+(std::streamoff, long int) <built-in>
Solution: explicitly cast the "int" to "std::streamoff".
This happens in files VTK/IO/vtkBMPReader.cxx and VTK/IO/vtkImageReader.cxx