# How can I solve the error, Cannot build Rendering examples without VTK\_SOURCE\_DIR

**URL:** https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219
**Category:** Support
**Created:** [February 19, 2021, 1:18pm UTC](https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219 "2021-02-19T13:18:42Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![xiaocaiji](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/x/b9bd4f/32.png) [@xiaocaiji](https://discourse.vtk.org/u/xiaocaiji)
#### Post date: [February 19, 2021, 1:18pm UTC](https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219/1 "2021-02-19T13:18:42Z")

</div>

I tried to build the example “Rendering” in VTK8.2.0, and then I get the error:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/c/c02d9f179bb2a2db28f86d47bb527bfc1c634d6b.png)

In the CMakeLists, what I have seen is

 ![image](https://discourse.vtk.org/uploads/default/original/2X/1/1489145b76947b6f6deb5aab8f5f5c056feedc85.png)

---

<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: [February 19, 2021, 2:40pm UTC](https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219/2 "2021-02-19T14:40:20Z")

</div>

It seems that that example is currently untested. It will need porting to VTK 9 before it is useful as-is.

VTKExamples which probably has examples which are working better. See [this post](https://discourse.vtk.org/t/the-new-vtk-examples-site-is-now-live/4652).

---

<div class="post-metadata">

### Author: ![xiaocaiji](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/x/b9bd4f/32.png) [@xiaocaiji](https://discourse.vtk.org/u/xiaocaiji)
#### Post date: [February 19, 2021, 2:55pm UTC](https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219/3 "2021-02-19T14:55:13Z")

</div>

Thank you so much, I’ll try your method

---

<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: [February 20, 2021, 10:08pm UTC](https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219/4 "2021-02-20T22:08:36Z")

</div>

The examples in the VTK source files are unmaintained. The majority of the examples have been moved to [vtk-examples](https://kitware.github.io/vtk-examples/site/).

For example, the examples you refer to (and many more) are found in the [rendering](https://kitware.github.io/vtk-examples/site/Cxx/#rendering) section.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [February 20, 2021, 10:51pm UTC](https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219/5 "2021-02-20T22:51:32Z")

</div>

They should be removed imo.

---

<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: [February 20, 2021, 11:57pm UTC](https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219/6 "2021-02-20T23:57:23Z")

</div>

+1

I have added this script [SelectExamples](https://kitware.github.io/vtk-examples/site/Python/Utilities/SelectExamples/). You just specify a VTK Class and Language and it will give you a set of links to the relevant VTK examples. It uses a JSON file: [vtk\_vtk-examples\_xref.json](https://raw.githubusercontent.com/Kitware/vtk-examples/gh-pages/src/Coverage/vtk_vtk-examples_xref.json) that is generated automatically when the VTK Examples are updated. It contains all the VTK examples grouped by VTK Class and Language, @sankhesh, when he has time, is also looking in to using this to provide links to the VTK examples from the VTK Documentation.

---

<div class="post-metadata">

### Author: ![xiaocaiji](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/x/b9bd4f/32.png) [@xiaocaiji](https://discourse.vtk.org/u/xiaocaiji)
#### Post date: [February 21, 2021, 4:09pm UTC](https://discourse.vtk.org/t/how-can-i-solve-the-error-cannot-build-rendering-examples-without-vtk-source-dir/5219/7 "2021-02-21T16:09:59Z")

</div>

Thank you so much!
