# vtkEventData.h is missing

**URL:** https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634
**Category:** Development
**Created:** [August 21, 2019, 7:06pm UTC](https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634 "2019-08-21T19:06:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Alfonso\_ZR](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/e47774/32.png) [@Alfonso\_ZR](https://discourse.vtk.org/u/Alfonso_ZR)
#### Post date: [August 21, 2019, 7:06pm UTC](https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634/1 "2019-08-21T19:06:14Z")

</div>

Hey all,

I’m working on a VR program, and when I try to compile it I get the following error:

Cannot open include file: ‘vtkEventData.h’; no such file or directory.

What could be issue here?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [August 22, 2019, 2:34am UTC](https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634/2 "2019-08-22T02:34:44Z")

</div>

By “VR” do you mean volume rendering or virtual reality? Do you have a vtkEventData.h somewhere in your VTK source folder? Which file is being compiled when you get this error? Can you copy-paste here the complete error message?

---

<div class="post-metadata">

### Author: ![Alfonso\_ZR](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/e47774/32.png) [@Alfonso\_ZR](https://discourse.vtk.org/u/Alfonso_ZR)
#### Post date: [August 22, 2019, 2:51am UTC](https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634/3 "2019-08-22T02:51:09Z")

</div>

Hello Andras. Sorry, after re-reading my post I realized I wasn’t too clear.

Yes, by VR I mean virtual reality. I do have the vtkEventData.h in my VTK source folder, which is - D:\VTK\VTK-8.2.0\Common\Core

The error appears when I try to compile the CylinderExample.cxx that I got from the VTK examples page

[https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/CylinderExample/](https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/CylinderExample/)

I modified this code in order to view this cylinder in a HTC Vive device.

Heres the code:

```
#include <vtkActor.h>
#include <vtkCamera.h>
#include <vtkCylinderSource.h>
#include <vtkNamedColors.h>
#include <vtkPolyDataMapper.h>
#include <vtkProperty.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderer.h>
#include <vtkSmartPointer.h>
#include <vtkOpenVRRenderWindow.h>
#include <vtkOpenVRRenderer.h>
#include <vtkOpenVRRenderWindowInteractor.h>
#include <vtkOpenVRCamera.h>
#include <array>

int main(int, char *[]) {
  vtkSmartPointer<vtkNamedColors> colors =
      vtkSmartPointer<vtkNamedColors>::New();

  // Set the background color.
  std::array<unsigned char, 4> bkg{{26, 51, 102, 255}};
  colors->SetColor("BkgColor", bkg.data());

  // This creates a polygonal cylinder model with eight circumferential facets
  // (i.e, in practice an octagonal prism).
  vtkSmartPointer<vtkCylinderSource> cylinder =
      vtkSmartPointer<vtkCylinderSource>::New();
  cylinder->SetResolution(8);

  // The mapper is responsible for pushing the geometry into the graphics
  // library. It may also do color mapping, if scalars or other attributes are
  // defined.
  vtkSmartPointer<vtkPolyDataMapper> cylinderMapper =
      vtkSmartPointer<vtkPolyDataMapper>::New();
  cylinderMapper->SetInputConnection(cylinder->GetOutputPort());

  // The actor is a grouping mechanism: besides the geometry (mapper), it
  // also has a property, transformation matrix, and/or texture map.
  // Here we set its color and rotate it around the X and Y axes.
  vtkSmartPointer<vtkActor> cylinderActor = vtkSmartPointer<vtkActor>::New();
  cylinderActor->SetMapper(cylinderMapper);
  cylinderActor->GetProperty()->SetColor(
      colors->GetColor4d("Tomato").GetData());
  cylinderActor->RotateX(30.0);
  cylinderActor->RotateY(-45.0);

  // The renderer generates the image
  // which is then displayed on the render window.
  // It can be thought of as a scene to which the actor is added
  vtkSmartPointer<vtkOpenVRRenderer> renderer = vtkSmartPointer<vtkOpenVRRenderer>::New();
  renderer->AddActor(cylinderActor);
  renderer->SetBackground(colors->GetColor3d("BkgColor").GetData());
  // Zoom in a little by accessing the camera and invoking its "Zoom" method.
  vtkNew<vtkOpenVRCamera> cam;
  renderer->SetActiveCamera(cam);

  // The render window is the actual GUI window
  // that appears on the computer screen
  vtkSmartPointer<vtkOpenVRRenderWindow> renderWindow =
      vtkSmartPointer<vtkOpenVRRenderWindow>::New();
  renderWindow->SetSize(300, 300);
  renderWindow->AddRenderer(renderer);
  renderWindow->SetWindowName("Cylinder");

  // The render window interactor captures mouse events
  // and will perform appropriate camera or actor manipulation
  // depending on the nature of the events.
  vtkSmartPointer<vtkOpenVRRenderWindowInteractor> renderWindowInteractor =
      vtkSmartPointer<vtkOpenVRRenderWindowInteractor>::New();
  renderWindowInteractor->SetRenderWindow(renderWindow);

  // This starts the event loop and as a side effect causes an initial render.
  renderWindow->Render();
  renderWindowInteractor->Start();

  return EXIT_SUCCESS;
}

```

And here’s the error I get when I try to compile:

```auto
E1696 cannot open source file "vtkEventData.h"
C1083 cannot open include file: ‘vtkEventData.h’; no such file or directory.

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [August 22, 2019, 1:00pm UTC](https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634/4 "2019-08-22T13:00:55Z")

</div>

Is this `master` or 8.2?

---

<div class="post-metadata">

### Author: ![Alfonso\_ZR](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/e47774/32.png) [@Alfonso\_ZR](https://discourse.vtk.org/u/Alfonso_ZR)
#### Post date: [August 22, 2019, 1:05pm UTC](https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634/5 "2019-08-22T13:05:08Z")

</div>

Hello Ben. This is 8.2.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [August 22, 2019, 1:33pm UTC](https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634/6 "2019-08-22T13:33:27Z")

</div>

OK, this was fixed on `master`, but 8.2 didn’t have it.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [August 22, 2019, 1:38pm UTC](https://discourse.vtk.org/t/vtkeventdata-h-is-missing/1634/7 "2019-08-22T13:38:07Z")

</div>

[https://gitlab.kitware.com/vtk/vtk/merge\_requests/5892](https://gitlab.kitware.com/vtk/vtk/merge_requests/5892)
