[vtkusers] RedHat 9.2 gcc 3.2.2 compiling error with VTK 4.2

Tarjei Knapstad tarjeik at chemcon.no
Tue Sep 16 07:07:35 EDT 2003


On Fri, 2003-09-05 at 13:14, valdo meyer wrote:
> Hello,
> when compiling my program I get the following errors. Probably this has been 
> already fixed but I did not manage to retrieve anything about it in the 
> archive so please help. I have the stable (not a nightly) release of VTK 
> 4.2.
> 
> First error (easily fixed by forcing the type but should go without it):
> 
>   vtkMarchingCubes *extractor;
>   vtkStructuredPointsReader *reader;
>   [...]
>   this->extractor->SetInput((vtkImageData *)this->reader->GetOutput());
> 
> visVtkQtMarchingCubes.cxx:34: no corresponding function for:
>   vtkMarchingCubes::SetInput(vtkStructuredPoints*)
> /usr/local/include/vtk/vtkStructuredPointsToPolyDataFilter.h:43: candidates 
> are:
>   virtual void vtkStructuredPointsToPolyDataFilter::SetInput(vtkImageData*)
> 

My guess is you're not including vtkStructuredPoints.h, which means the
compiler doesn't know that vtkStructuredPoints is derived from
vtkImageData. Whenever you get this sort of error, check that you have
the necessary includes.


> Second error (have not managed to fix it up to now):
> 
>   vtkActor *actor;
>   float Color[3];
>   [...]
>   this->actor->GetProperty()->SetColor(this->Color);
> 
> visVtkQtMarchingCubes.cxx:47: invalid use of indefined type «struct 
> vtkProperty»
> /usr/local/include/vtk/vtkActor.h:42: forward declaration of «struct 
> vtkProperty»
> 

Same thing here, missing include of vtkActor.h (you've only forward
declared somewhere).

--
Tarjei




More information about the vtkusers mailing list