[Insight-users] Re: problem in vtk

Luis Ibanez luis.ibanez at kitware.com
Mon, 01 Mar 2004 20:46:51 -0500


Hi Longfei,

Are you including the header file of vtkProperty   ?

something like:


     #include "vtkProperty.h"


What VTK version are you using  ?


Regards,


   Luis



-----------------------
Longfei Cong wrote:

> Hi luis:
>          I am a really freshmen of using VTk . i want to compile the program in the net http://www.vtk.org/example-code.php in MFC, while the warning of the fist example is 
> //*******
> E:\vtk\test\err225\Arrays.cxx(24) : error C2027: use of undefined type 'vtkProperty'
>         E:\vtk\VTK\Rendering\vtkActor.h(42) : see declaration of 'vtkProperty'
> E:\vtk\test\err225\Arrays.cxx(24) : error C2227: left of '->SetColor' must point to class/struct/union
> Error executing cl.exe       
>   //*****
> 
> There are no problem in the compiling of second example. but the initialization of the program is failed.
> 
> there CMakeLists.txt file of both examples is 
> //********8
> 
>  			PROJECT(myProject)
> 
> FIND_PACKAGE ( ITK)
>  IF ( ITK_FOUND)
>     INCLUDE( ${USE_ITK_FILE} )
>   ENDIF( ITK_FOUND)
> 
>  FIND_PACKAGE ( VTK)
>   IF ( VTK_FOUND)
>     INCLUDE( ${USE_VTK_FILE} ) 
>   ENDIF( VTK_FOUND)
>   
> INCLUDE_DIRECTORIES(${myProject_SOURCE_DIR})
> 
> ADD_EXECUTABLE( myProject Arrays.cxx)
> 
> TARGET_LINK_LIBRARIES ( myProject ITKBasicFilters ITKCommon ITKIO vtkRendering vtkGraphics vtkHybrid vtkImaging vtkIO vtkFiltering vtkCommon)
> 
> Best regards!	
> 
>         Longfei Cong
>         lfcong at nlpr.ia.ac.cn
>           2004-03-01
> 
> 
> 
> 
> 
>