[IGSTK-Developers] Open Problem

Hee-su Kim hkim at isis.imac.georgetown.edu
Fri Jun 3 18:47:11 EDT 2005


Hi, guys:

Here is a problem what I've tackled for 3days but failed.

As VTK doesn't have its namespace and IGSTK have igstk namespace, VC6 and some Linux compilers report error to resolve operator<< for vtkIndent. 

.NET2003 and some Linux compilers could compile it well.

ostream& operator<<(ostream& os, vtkIndent indent);   <-- this function should be found during compilation & linking.

I included "vtkIndent.h" and <iostream> and tried to resolve namespace using ::, std::, function declaration and so on.

void VTKLoggerOutput::PrintSelf(StdOStreamType& os, vtkIndent indent)
{
  os << indent << "VTKLoggerOutput (" << this << ")\n";
  Superclass::PrintSelf((ostream&)os, indent);
  indent = indent.GetNextIndent();

  if( this->Logger )
  {
//    ::operator<<((ostream&)os , indent);                    <--- This style makes the code compiled but exception occurs during runtime.
    os << indent << "Logger is available" << std::endl;
  }
}

This problem is also applied to igstk::View, View2D and View3D because they're derived from a VTK class.

Thanks,
Hee-Su

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20050603/d4931447/attachment-0001.html>


More information about the IGSTK-Developers mailing list