# VTK example

**URL:** https://discourse.vtk.org/t/vtk-example/3769
**Category:** Support
**Created:** [July 14, 2020, 11:13am UTC](https://discourse.vtk.org/t/vtk-example/3769 "2020-07-14T11:13:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![AmBou99](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@AmBou99](https://discourse.vtk.org/u/AmBou99)
#### Post date: [July 14, 2020, 11:13am UTC](https://discourse.vtk.org/t/vtk-example/3769/1 "2020-07-14T11:13:29Z")

</div>

Hello everyone,

I’m new with vtk and in this forum.  
I have a question about the example on the website of VTK like this example : [https://lorensen.github.io/VTKExamples/site/Cxx/IO/JPEGWriter/](https://lorensen.github.io/VTKExamples/site/Cxx/IO/JPEGWriter/)

I use cmake-gui : for the source folder I choose the folder where the cmakefile is here and I create an other folder for the build.  
Before that I create an other folder and in this folder I compile vtk (git clone etc.)  
When I go in the JPEGWriter/build and I do make nothing append ! When i say nothing append, it’s like you do a “ls” on a empty folder, nothing appends.  
So I havn’t an exec to run the example.  
Maybe i forget an instruction ?

Thanks for your help !

AmBou99

---

<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: [July 15, 2020, 11:28am UTC](https://discourse.vtk.org/t/vtk-example/3769/2 "2020-07-15T11:28:51Z")

</div>

Was the configure step of the example successful ?

---

<div class="post-metadata">

### Author: ![AmBou99](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@AmBou99](https://discourse.vtk.org/u/AmBou99)
#### Post date: [July 15, 2020, 12:37pm UTC](https://discourse.vtk.org/t/vtk-example/3769/3 "2020-07-15T12:37:39Z")

</div>

I try something and now it works !  
But i don’t think it is normal.  
I have a folder VTK (there are many thing in this folder because I clone with the git)  
In this folder I create a folder vtk-build (empty folder).  
I extract the JPEGWriter.tar and if I follow the instructions I need to go in the folder build : /JPEGWriter/build  
When I am in build I have two choice : 1) if VTK is installed or 2) not installed but compiled somewhere  
I am in the choice 2, so I do that : cmake -DVTK\_DIR:PATH=/home/me/vtk\_build …

If I do that in the build folder I have this message :  
No source or binary directory provided. Both will be assumed to be the  
same as the current working directory, but note that this warning will  
become a fatal error in future CMake releases.

CMake Error: The source directory “blabla/JPEGWriter/build” does not appear to contain CMakeLists.txt.  
Specify --help for usage, or press the help button on the CMake GUI.

But if I do that in JPEGWriter (so I don’t enter in the folder build) it works, I do make and I have a run.

Is it normal ?

Thanks for your answer !

---

<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: [July 15, 2020, 12:52pm UTC](https://discourse.vtk.org/t/vtk-example/3769/4 "2020-07-15T12:52:37Z")

</div>

you have to point to your source dir.

cd build  
cmake …/
