[vtkusers] Problems Building an example

Ipaq hp ipaqdebolsillo at hotmail.com
Thu May 6 07:49:20 EDT 2004


I dont know what i have miss in the installation, i have use the precompiled 
librries, once i try to buil de example:

#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   ****This 
line gives me an error when compiling***


  // 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 gives me this errors:
Linking...
ejemplo1vtk.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: void __thiscall vtkRenderer::AddActor(class 
vtkProp *)" (__imp_?AddActor at vtkRenderer@@QAEXPAVvtkProp@@@Z)
ejemplo1vtk.obj : error LNK2001: unresolved external symbol 
"__declspec(dllimport) public: void __thiscall 
vtkRenderWindowInteractor::SetRenderWindow(class vtkRenderWindow *)" 
(__imp_?SetRenderWindow at vtkRenderWindowInteractor@@QAEXPAVvtkRenderWindow
@@@Z)
.......
and so on.

Thanks.

_________________________________________________________________
Correos más divertidos con fotos y textos increíbles en MSN Premium. 
Pruébalo gratis dos meses. 
http://join.msn.com/?pgmarket=es-es&page=features/richmail&XAPID=1684&DI=1055&HL=TAG6OPENINGTEXT_MSNPREMIUM_VIRUS




More information about the vtkusers mailing list