[vtkusers] Errors

Brian Chacko brianchacko at yahoo.com
Sat Sep 2 02:51:09 EDT 2006


Brian: 
  I tried to run a sample program available on the site. It is a sphere program. i build the program in VC++ 6.0. I have also made available all the directories containing the include files in the program. This is the following error i have recieved after compilng.
  The sphere program is
   
  --------------------------------Sphere Program   http://www.vtk.org/example-code.php   ---------

#include "vtkSphereSource.h"  #include "vtkPolyDataMapper.h"  #include "vtkActor.h"  #include "vtkRenderWindow.h"  #include "vtkRenderer.h"  #include "vtkRenderWindowInteractor.h"    void main ()  {      // create sphere geometry    vtkSphereSource *sphere = vtkSphereSource::New();    sphere->SetRadius(1.0);    sphere->SetThetaResolution(18);    sphere->SetPhiResolution(18);      // map to graphics library    vtkPolyDataMapper *map = vtkPolyDataMapper::New();    map->SetInput(sphere->GetOutput());      // actor coordinates geometry, properties, transformation    vtkActor *aSphere = vtkActor::New();    aSphere->SetMapper(map);    aSphere->GetProperty()->SetColor(0,0,1); // sphere color blue      // a renderer and render window    vtkRenderer *ren1 = vtkRenderer::New();    vtkRenderWindow *renWin = vtkRenderWindow::New();    renWin->AddRenderer(ren1);      // an interactor    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();    iren->SetRenderWindow(renWin);
      // add the actor to the scene    ren1->AddActor(aSphere);    ren1->SetBackground(1,1,1); // Background color white      // render an image (lights and cameras are created automatically)    renWin->Render();      // begin mouse interaction    iren->Start();  }  
   
   
  --------------------Configuration: VTK Trial - Win32 Debug--------------------
Compiling...
Trial.cpp
C:\Brian Assignment\Project\VTK Trial\Trial.cpp(24) : error C2027: use of undefined type 'vtkProperty'
        c:\program files (x86)\vtk 5.0\vtk\rendering\vtkactor.h(39) : see declaration of 'vtkProperty'
C:\Brian Assignment\Project\VTK Trial\Trial.cpp(24) : error C2227: left of '->SetColor' must point to class/struct/union
Error executing cl.exe.
  Trial.obj - 2 error(s), 0 warning(s)
   

 		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060901/ff61aa0f/attachment.htm>


More information about the vtkusers mailing list