[vtkusers] Build Problem with SGI C++ ANSI/ISO compilation
Fred Dech
fdech at uchicago.edu
Wed Feb 5 15:25:39 EST 2003
hi.
i'm having mixed success building VTK 4.0 on an SGI running
IRIX 6.5.17m, C++ 7.3. to generate the Makefiles, i used the CMake binary
1.4.7, since CMake 1.6.2 would give me early build failures.
if i do not set "VTK_USE_ANSI_STDLIB" to 'ON' and avoid using the -LANG:std CC
flag, i can build the entire VTK successfully. however, i would like to also
build ITK Insight, which requires that VTK be built using ANSI standard
iostream lib.
i only encounter compilation errors in the $(VTKHOME)/IO directory.
the errors are isolated to '+' operator overloading ambiguities with
std::fpos<mbstate_t>::operator+(std::streamoff)...
-------------------------------------------------------------
/usr/local/bin/cmake -S/usr/local/VTK/IO -O/usr/local/VTK/IO -H/usr/local/VTK -B
/usr/local/VTK
`cmake.depends' is up to date.
/usr/bin/CC -LANG:std -DvtkIO_EXPORTS -I/usr/local/VTK/IO -I/usr/local/VTK/Ren
dering -I/usr/local/VTK/Hybrid -I/usr/local/VTK -I/usr/local/VTK/Common -I/usr/l
ocal/VTK/Filtering -I/usr/local/VTK/Imaging -I/usr/local/VTK/Graphics -I/usr/loc
al/VTK/IO -I/usr/local/VTK/Utilities/zlib -I/usr/local/VTK/Utilities/png -I/usr/
local/VTK/Utilities/jpeg -I/usr/local/VTK/Common/Testing/Cxx -I/usr/freeware/inc
lude -c /usr/local/VTK/IO/vtkBMPReader.cxx -o vtkBMPReader.o
cc-1324 CC: ERROR File = /usr/local/VTK/IO/vtkBMPReader.cxx, Line = 474
More than one operator "+" matches the specified operands.
Built-in operator "arithmetic + arithmetic" has an overloading
ambiguity.
Function symbol function
"std::fpos<mbstate_t>::operator+(std::streamoff)" is
ambiguous by inheritance.
The operand types are: std::basic_istream<char,
std::char_traits<char>>::pos_type + long.
self->GetFile()->seekg(self->GetFile()->tellg() + static_cast<long>(stre
amSkip0), ios::beg);
^
detected during instantiation of "void
vtkBMPReaderUpdate2(vtkBMPReader *, vtkImageData *, double
*)"
-------------------------------------------------------------
it's not clear at all to me how to work this out.
i'd be very appreciative of any advice.
thanks.
--fred
--
Fred Dech fdech at uchicago.edu
University of Chicago Dept. of Surgery
Ph: (773) 834-8359, Fax: (773) 702-0564
More information about the vtkusers
mailing list