# Error:Failed to build the official example WrappedAsyncClipper with VTK 9.6.

**URL:** https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308
**Category:** Web
**Created:** [February 28, 2026, 9:42am UTC](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308 "2026-02-28T09:42:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ZLong-Li](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zlong-li/32/6470_2.png) [@ZLong-Li](https://discourse.vtk.org/u/ZLong-Li)
#### Post date: [February 28, 2026, 9:42am UTC](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308/1 "2026-02-28T09:42:49Z")

</div>

Hello, recently I tried to build WebAssembly with VTK 9.6, and successfully built VTK after enabling `VTK_WEBASSEMBLY_THREADS=TRUE`. However, when I attempted to build `WrappedAsyncClipper` **without a `main` function** , an error was thrown. The command I used to build VTK 9.6 is as follows:

```auto
emcmake cmake -S D:\vtk\vtk9.6 -B D:\vtk\vtk9.6wb -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DVTK_ENABLE_WEBGPU:BOOL=OFF -DVTK_WEBASSEMBLY_THREADS:BOOL=TRUE -DVTK_BUILD_EXAMPLES:BOOL=TRUE 

```

Command used to build the example：

```auto
emcmake cmake -S D:\vtk\vtk9.6\Examples\Emscripten\Cxx\WrappedAsyncClipper\ -B D:\vtk\vtkExample\WraapedAsyncClipper\ -G "Ninja" -DVTK_DIR=D:\vtk\vtk9.6wb\ -DCMAKE_BUILD_TYPE=Release

```

And an exception will be thrown during the final linking phase:

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

It prompts that the main function must be defined, but in many cases we do not need the main function. This example, in particular, demonstrates how to start WebAssembly without using the main function.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [March 1, 2026, 2:40pm UTC](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308/2 "2026-03-01T14:40:31Z")

</div>

Hello,

Without a verbose log it’s hard to tell. With just that screen capture I can only tell that the linker is expecting the _implementation_ of the `main()`function somewhere. That is standard C/C++. Now, to build a library without an entry point, you somehow need to explicitly tell the linker to not look for a `main()` (e.g. via the `--no-entry` linker flag).

best,

PC

---

<div class="post-metadata">

### Author: ![ZLong-Li](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zlong-li/32/6470_2.png) [@ZLong-Li](https://discourse.vtk.org/u/ZLong-Li)
#### Post date: [March 2, 2026, 1:10am UTC](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308/3 "2026-03-02T01:10:43Z")

</div>

Hello, thank you for your reply.  
All the log output is normal. I am compiling the WrappedAsyncClipper example from the official examples, following the steps in the documentation exactly. It can be built and run successfully with VTK 9.5, but this error is thrown during the final linking phase with VTK 9.6.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [March 2, 2026, 11:00am UTC](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308/4 "2026-03-02T11:00:49Z")

</div>

Likely the example code needs to be patched/updated in order to link against the newer version of VTK.

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [March 2, 2026, 4:29pm UTC](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308/5 "2026-03-02T16:29:52Z")

</div>

Hello @ZLong-Li,

Thank you for sharing the command line and verbose log. You are correct, we do NOT need to define a `main()` in that example. I will look into this and get back.

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [March 2, 2026, 5:28pm UTC](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308/6 "2026-03-02T17:28:02Z")

</div>

welp, i broke this in [https://gitlab.kitware.com/vtk/vtk/-/commit/ea72ffe886a64f9bb17949f58b1d3a170433f78a](https://gitlab.kitware.com/vtk/vtk/-/commit/ea72ffe886a64f9bb17949f58b1d3a170433f78a)

The `-sPROXY_TO_PTHREAD=1` with `INTERFACE` visibility causes emscripten to compile in the proxy main file (crt1\_proxy\_main.c) which references a `main()`.

I will fix it upstream and likely release in 9.6.1
