[vtkusers] Unhandled exception

eded [fredy] ededc at hotmail.com
Sun Apr 9 13:52:33 EDT 2006


I would like to use vtk, but i've a little problem with the installation.
I followed all the steps in order to install vtk, i installed the latest 
release, and i'm using cmake, 2.2, also i use a script, when i build my 
project with cmake. I would like to use Visual C++, i've installed the patch 
for Visual Studio 6, and i believe i have all the requirements, but i've an 
error when i run my program, this is the message

Unhandled exception in MyProgram.exe (VTKCOMMON.dll): 0xC000000005 Access 
Violation

Is it an error in VC? Please help me!

This is the code in C++

#include "vtkRenderWindow.h"
#include "vtkRenderer.h"
#include "vtkActor.h"
#include "vtkConeSource.h"
#include "vtkPolyDataMapper.h"

void main()
{
	vtkRenderWindow *renwin = vtkRenderWindow::New();
	vtkRenderer *ren1 = vtkRenderer::New();
	renwin->AddRenderer(ren1);
	vtkConeSource *cone = vtkConeSource::New();
	cone->SetResolution(8);
	vtkPolyDataMapper *map = vtkPolyDataMapper::New();
	map->SetInput(cone->GetOutput());
	vtkActor *act = vtkActor::New();
	act->SetMapper(map);
	ren1->AddActor(act);
	renwin->Render();
}

Fredy Carranza Athó
Estudiante Ciencias de la Computación
J c pas! Tu le c?

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the vtkusers mailing list