# Building VTK emscripten cone example uses outdated VTK version?

**URL:** https://discourse.vtk.org/t/building-vtk-emscripten-cone-example-uses-outdated-vtk-version/11862
**Category:** Support
**Created:** [July 1, 2023, 10:01pm UTC](https://discourse.vtk.org/t/building-vtk-emscripten-cone-example-uses-outdated-vtk-version/11862 "2023-07-01T22:01:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rmarr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rmarr](https://discourse.vtk.org/u/rmarr)
#### Post date: [July 1, 2023, 10:01pm UTC](https://discourse.vtk.org/t/building-vtk-emscripten-cone-example-uses-outdated-vtk-version/11862/1 "2023-07-01T22:01:37Z")

</div>

I’m trying to build VTK for emscripten and was able to do so successfully. Now I would like to test my build using the cone example listed here:  
[https://gitlab.kitware.com/vtk/vtk/-/blob/master/Examples/Emscripten/Cxx/Cone/README.md](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Examples/Emscripten/Cxx/Cone/README.md)  
When I do:

```auto
emcmake cmake \
  -G Ninja \
  -DVTK_DIR=/work/build-vtk-wasm \
  /work/src/Examples/Emscripten/Cxx/Cone

```

I see the error:

```auto
CMake Error at /work/build-vtk-wasm/vtk-config.cmake:1 (include):
  include could not find requested file:

    /Users/ryanmarr/VTK/build-vtk-wasm/lib/cmake/vtk-9.2/vtk-config.cmake
Call Stack (most recent call first):
  CMakeLists.txt:17 (find_package)

CMake Error at CMakeLists.txt:139 (vtk_module_autoinit):
  Unknown CMake command "vtk_module_autoinit".

-- Configuring incomplete, errors occurred!
See also "/work/build-cone/CMakeFiles/CMakeOutput.log".
emcmake: error: 'cmake -G Ninja -DVTK_DIR=/work/build-vtk-wasm /work/src/Examples/Emscripten/Cxx/Cone -DCMAKE_CROSSCOMPILING_EMULATOR=/emsdk/node/14.18.2_64bit/bin/node;--experimental-wasm-bulk-memory;--experimental-wasm-threads' failed (returned 1)

```

Is `vtl_module_autoinit` an outdated command? If so I’d like to find an example that used updated code so I can start using VTK.

---

<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: [July 20, 2023, 7:41pm UTC](https://discourse.vtk.org/t/building-vtk-emscripten-cone-example-uses-outdated-vtk-version/11862/2 "2023-07-20T19:41:32Z")

</div>

That’s not the “real” error. That command would appear if this include had worked:

> [@rmarr](#):
>
> ```auto
> CMake Error at /work/build-vtk-wasm/vtk-config.cmake:1 (include):
> include could not find requested file:
> 
> /Users/ryanmarr/VTK/build-vtk-wasm/lib/cmake/vtk-9.2/vtk-config.cmake
> 
> ```

Does any other `vtk-config.cmake` file exist in the build tree?
