[vtkusers] COnversion to 4.2

Charl P. Botha c.p.botha at ewi.tudelft.nl
Thu Mar 11 09:05:01 EST 2004


Both of your errors are related to the same fundamental change.  VTK
doesn't include possibly unnecessary headers anymore in order to speed
building.  This means that if you make use of a class, you have to make
sure that YOU include its header.

On Thu, 2004-03-11 at 13:19, James C. Robinson wrote:
> Error 1:
> :\Jim\Programming\mfc\Kes\PanMeshv3.1\Source\cross-section.cpp(48) : error
> C2664: 'SetInput' : cannot convert parameter 1 from 'class
> vtkUnstructuredGrid *' to 'class vtkDataSet *'
>         Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
> 
> // The actual plane surface
>     pCrossSection->SetInput(pMeshReader->GetOutput()) ;
>     pCrossSection->SetCutFunction(pPlane) ;
> 
> Where pCrossSection is a vtkCutter* and pMeshReader is a
> vtkUnstructuredGridReader*. This code worked under v4.0.

Make sure that your code explicitly includes both vtkUnstructuredGrid.h
and vtkDataSet.h.


> 
> Error 2:
> 
> C:\Jim\Programming\mfc\Kes\PanMeshv3.1\Source\cross-section.cpp(59) : error
> C2027: use of undefined type 'vtkPolyDataMapper'
>         C:\Jim\Programming\VTK 4.2\VTK\Rendering\vtkDataSetMapper.h(32) :
> see declaration of 'vtkPolyDataMapper'

Same problem: make sure that your code (in this case cross-section.cpp)
explicitly includes "vtkPolyDataMapper.h".


> Finally, before I make a total mess of good code that works under v4.0, what
> other changes have been made that will affect either the compilation or the
> running of my code?


http://public.kitware.com/cgi-bin/vtkfaq?req=all#6.8

Good luck,
Charl

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/





More information about the vtkusers mailing list