[vtkusers] VTK 4.2 on RedHat 9

Juan Aja juaja at hotmail.com
Wed Aug 25 21:15:58 EDT 2004


Hi.
I've been struggling with the vtk installation on RedHat 9.
I downloaded the file VTK-4.2-LatestRelease.tar.gz from vtk.org, untared and 
basically followed the instructions on Readme.html.
I ran cmake -i and answered the questions one by one (I'm trying to do a 
basic install, just the right things to work with vtk in C and C++), then as 
root I did make, everything went perfect.

But when I tried to look for the vtk directory in /usr/local or in /us/lib I 
didn't found anything, somehow the installation was made in the VTK source 
directory (and I specifically told cmake to build it in /usr/local). Any 
ideas?.

Also I can't manage to compile a simple example taken from: 
http://public.kitware.com/VTK/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();
}

It appears that the libraries needed can't be found, so could you tell me 
how could I compile this simple example?

Thanks a lot.

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail




More information about the vtkusers mailing list