[vtkusers] vtk 4.2 compilation error, linux, vtkBMPRead.cxx

Dongbai Guo guodongbai at gmail.com
Wed Mar 16 23:23:57 EST 2005


In fact, just found that the fix is easy:
Simply swap the two parameters:
from:
       self->GetFile()->seekg(self->GetFile()->tellg() + streamSkip0, 
ios::beg);
to:
     self->GetFile()->seekg(streamSkip0 + self->GetFile()->tellg(), 
ios::beg);
 There are some similiar error elsewhere.

dongbai

Kent Eschenberg wrote:

> This a bug reported and resolved by the gcc developers. I last checked 
> when I had the same problem a few weeks ago - maybe an upgrade is now 
> available.
>
> Kent
>
> --On Wednesday, March 16, 2005 11:06:56 PM -0500 Dongbai Guo 
> <guodongbai at gmail.com> wrote:
>
>> Anybody knows a workaround?
>>
>> thx
>> Db.
>>
>> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx: In function 
>> `void
>> vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT =
>> double]':
>> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:545:
>> instantiated from here
>> /data/dev/public/vtk/vtk-4.2_linux/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.2/../../../../include/c++/3.4.2/bits/p 
>>
>> ostypes.h:176: note: candidate 1: std::fpos<_StateT>
>> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT =
>> mbstate_t]
>> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:507: note:
>> candidate 2: operator+(std::streamoff, long int) <built-in>
>> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:545:
>> instantiated from here
>> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:511: 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:
>
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages 
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list