# VTK 9.2 Can't Compile PolyLine Example

**URL:** <https://discourse.vtk.org/t/vtk-9-2-cant-compile-polyline-example/9508>\
**Category:** Development\
**Created:** [September 30, 2022, 3:24pm UTC](https://discourse.vtk.org/t/vtk-9-2-cant-compile-polyline-example/9508 "2022-09-30T15:24:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzhang](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@jzhang](https://discourse.vtk.org/u/jzhang)\
**Post date:** [September 30, 2022, 3:24pm UTC](https://discourse.vtk.org/t/vtk-9-2-cant-compile-polyline-example/9508/1 "2022-09-30T15:24:37Z")

</div>

I’m trying to build a project that sends a PolyData message over IGTLink. However, when I copied over the C++ example for [PolyLine](https://kitware.github.io/vtk-examples/site/Cxx/GeometricObjects/PolyLine/), I get an error on the following line:  
`polyLine->GetPointIds()->SetNumberOfIds(2)`  
The error states that: “pointer to incomplete class type ‘vtkIdList’ is not allowed.” I then tried building the entire example without using IGTLink, just to see if the error persisted. It did. I tried to see if I was missing a header that needed to be included but got nowhere. I had cloned the VTK repo just yesterday. Does anyone know what the issue is and how to fix it? I managed to get the code to compile when using VTK 9.0.0

---

<div class="post-metadata">

**Author:** ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)\
**Post date:** [September 30, 2022, 4:40pm UTC](https://discourse.vtk.org/t/vtk-9-2-cant-compile-polyline-example/9508/2 "2022-09-30T16:40:46Z")

</div>

Do you mean “vtkIdList” (not vtkIDList) ?

---

<div class="post-metadata">

**Author:** ![jzhang](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@jzhang](https://discourse.vtk.org/u/jzhang)\
**Post date:** [September 30, 2022, 5:09pm UTC](https://discourse.vtk.org/t/vtk-9-2-cant-compile-polyline-example/9508/3 "2022-09-30T17:09:42Z")

</div>

Yes that is a typo. I do apologize for that. I’ve now edited the first post to remove confusion.

---

<div class="post-metadata">

**Author:** ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)\
**Post date:** [October 3, 2022, 5:50am UTC](https://discourse.vtk.org/t/vtk-9-2-cant-compile-polyline-example/9508/4 "2022-10-03T05:50:07Z")

</div>

I just downloaded the tarbell and it all builds Ok.

> [@jzhang](#):
>
> SetNumberOfIds(2)

Why did you change this to 2? It is 5 in the example.

If this doesn’t work, I would suggest deleting the VTK build folder and then recompiling VTK.
