# How to create the vtk.exe

**URL:** <https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482>\
**Category:** Development\
**Tags:** proposal\
**Created:** [January 22, 2020, 5:04pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482 "2020-01-22T17:04:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnny](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@Johnny](https://discourse.vtk.org/u/Johnny)\
**Post date:** [January 22, 2020, 5:04pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/1 "2020-01-22T17:04:30Z")

</div>

How to create the vtk.exe, I just show the .tcl file, there is no any tips to show how to create the vtk.exe?

---

<div class="post-metadata">

**Author:** ![Michael](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michael/32/16_2.png) [@Michael](https://discourse.vtk.org/u/Michael)\
**Post date:** [January 23, 2020, 12:30pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/2 "2020-01-23T12:30:31Z")

</div>

What do you mean by vtk.exe? VTK is a library, you should expect to have .dll files.

---

<div class="post-metadata">

**Author:** ![Johnny](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@Johnny](https://discourse.vtk.org/u/Johnny)\
**Post date:** [January 23, 2020, 2:23pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/3 "2020-01-23T14:23:43Z")

</div>

I remember there is an binary download package installation, there is vtk.exe, but now there is no binary installation

---

<div class="post-metadata">

**Author:** ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)\
**Post date:** [January 23, 2020, 3:15pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/4 "2020-01-23T15:15:34Z")

</div>

The vtk.exe is not included in any of the VTK packages that are available, and VTK dropped Tcl support completely in 2017.

It is possible to build vtk.exe from the VTK 7.1.1 source code.

---

<div class="post-metadata">

**Author:** ![Johnny](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@Johnny](https://discourse.vtk.org/u/Johnny)\
**Post date:** [January 23, 2020, 9:34pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/5 "2020-01-23T21:34:14Z")

</div>

thank you for the reply, but I didn’t find the project in VTK 7.1.1 to create the VTK.exe,  
is it the project of vtkwraptcl? it shows I need to download from other website if I enabled this option in CMake-gui

it’s really disappointed even such basic requirement

---

<div class="post-metadata">

**Author:** ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)\
**Post date:** [January 23, 2020, 10:26pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/6 "2020-01-23T22:26:38Z")

</div>

The CMake options you need to set for building vtk.exe are `VTK_WRAP_TCL=ON` and `VTK_USE_TK=ON`. You will also want to set `BUILD_TESTING:BOOL=OFF` to avoid extra downloads and build time.

The last time that I built vtk.exe, myself, was about two years ago. I had to do the following:

1. download source for Tcl8.6, then build and install it.
2. download source for Tk8.6, then build and install it.
3. build VTK 7.1 from source.

Building Tcl and Tk was a pain, but this is necessary because none of the binary Tcl/Tk packages for Windows seem to have all the necessary header files.

If you are really interested in pursuing this (I warn you that it will take many hours of your time), then I can examine my previous build and give you more detailed instructions. Unfortunately Tcl is just not as well-supported as it was 10 or 20 years ago.

---

<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:** [January 24, 2020, 2:36pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/7 "2020-01-24T14:36:44Z")

</div>

As tcl is replaced by python, `vtk.exe` is replaced by `python.exe`. There is no need to build a custom executable, just `pip install vtk` in your python environment.

---

<div class="post-metadata">

**Author:** ![Johnny](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@Johnny](https://discourse.vtk.org/u/Johnny)\
**Post date:** [January 24, 2020, 5:29pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/8 "2020-01-24T17:29:11Z")

</div>

I have built and installed the tcl and tk , but I don’t know how to set the  
Could NOT find TCL (missing: TCL\_LIBRARY)  
Could NOT find TCLTK (missing: TCL\_LIBRARY TK\_LIBRARY)  
Could NOT find TK (missing: TK\_LIBRARY)

even I add those variables in the environment, but it is not valid, do you remember how to config?

---

<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:** [January 24, 2020, 5:47pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/9 "2020-01-24T17:47:07Z")

</div>

@Johnny, what are your reasons for trying to revive tcl support? Even if you succeeded, using tcl would isolate you from the rest of the world: anything that you do in tcl will not be of interest to most other people, and you won’t be able to benefit from all the enormous advancements that Python is going through nowadays. If you have legacy tcl code that you would like to keep using then you could invest time into porting that to Python instead of trying to restore VTK’s tcl support.

---

<div class="post-metadata">

**Author:** ![Johnny](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@Johnny](https://discourse.vtk.org/u/Johnny)\
**Post date:** [January 24, 2020, 5:57pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/10 "2020-01-24T17:57:43Z")

</div>

right now we have a legacy solution, it creates a tcl file and uses the vtk.exe to show. it just a isolated file. maybe it is another way by using the python

---

<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:** [January 24, 2020, 6:09pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/11 "2020-01-24T18:09:04Z")

</div>

Using Python, it’ll be a single executable, too, but you also need to copy a bunch of other files to the Python folder, too. It is a small price to pay for what you get. If single-file standalone executable is a must then you can look into building Python executable with VTK support embedded (probably not trivial effort but it may be useful in general).

---

<div class="post-metadata">

**Author:** ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)\
**Post date:** [January 24, 2020, 6:25pm UTC](https://discourse.vtk.org/t/how-to-create-the-vtk-exe/2482/12 "2020-01-24T18:25:31Z")

</div>

@Johnny those TCL variables must be set in cmake-gui. First, you must find where Tcl is installed on your system, and then find the tcl and tk libraries. For example:

```
TCL_LIBRARY=C:/Tcl86/lib/tcl86t.lib
TK_LIBRARY=C:/Tcl86/lib/tk86t.lib
TCL_INCLUDE_PATH=C:/Tcl86/include
TK_INCLUDE_PATH=C:/Tcl86/include

```

It might also be necessary to set the following, but cmake should find it automatically (the following path assumes your VTK source is in “C:/vtk-7.1”, so of course you would use the actual path to your VTK source tree).

```
TK_INTERNAL_PATH=C:/vtk-7.1/ThirdParty/TclTk/internals/tk8.6
```
