# Error during VTK 9.3.0 build from sources with Java Wrapper

**URL:** https://discourse.vtk.org/t/error-during-vtk-9-3-0-build-from-sources-with-java-wrapper/13538
**Category:** Support
**Created:** [March 14, 2024, 12:07pm UTC](https://discourse.vtk.org/t/error-during-vtk-9-3-0-build-from-sources-with-java-wrapper/13538 "2024-03-14T12:07:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zemekale](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/z/e56c9b/32.png) [@zemekale](https://discourse.vtk.org/u/zemekale)
#### Post date: [March 14, 2024, 12:07pm UTC](https://discourse.vtk.org/t/error-during-vtk-9-3-0-build-from-sources-with-java-wrapper/13538/1 "2024-03-14T12:07:57Z")

</div>

Hello!  
I am trying to build the VTK version 9.3.0 from git sources (commit 357d9ef) on Windows 11 x64. I was following [these](https://docs.vtk.org/en/latest/build_instructions/index.html) instructions and set the VTK\_WRAP\_JAVA=ON because I need the VTK.jar file. After executing the  
` cmake --build %HOMEPATH%\vtk\build --config Release`  
command, it run into the following error:

```auto
vtkCompositeSurfaceLICMapperJava.cxx.obj : error LNK2019: unresolved external symbol vtkCompositePolyDataMapper_Typecast referenced in function vtkCompositeSurfaceLICMapper_Typecast
lib\java\vtk-Windows-AMD64\vtkRenderingLICOpenGL2Java.dll : fatal error LNK1120: 1 unresolved externals

```

Does anyone know how to resolve the error?

I am using:  
CMake v3.28.3  
ninja v1.11.1  
Visual Studio 2022 (I also tried using 2019 and 2017)  
[Java 17](https://adoptium.net/temurin/releases/?os=windows&arch=x64&package=jdk&version=17)

I also tried building it with CMake GUI and Visual Studio, but got the same error.

Any advice would be highly appreciated.

---

<div class="post-metadata">

### Author: ![Esmool](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/e/9de053/32.png) [@Esmool](https://discourse.vtk.org/u/Esmool)
#### Post date: [September 6, 2024, 7:34am UTC](https://discourse.vtk.org/t/error-during-vtk-9-3-0-build-from-sources-with-java-wrapper/13538/2 "2024-09-06T07:34:17Z")

</div>

I met exactly the same problem with you.

Compared with previously successfully compiled projects, such like the project ‘vtkRenderingOpenGL2Java’, the error occuring project ‘vtkRenderingLICOpenGL2Java’ seems to be lack of the necessary reference to the project ‘vtkRenderingCoreJava’, where the symbol ‘vtkCompositePolyDataMapper\_Typecast’ defined in.

Simply add the project reference and manually add ‘…..\lib\Debug\vtkRenderingCoreJava.lib’ to the additional link libraries of the error compiling project will fix the problem.

This works on my computer, Win10, Visual Studio 2022 with VC++ 141, VTK 9.3.0, sun JDK 1.8.

---

<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: [September 6, 2024, 1:25pm UTC](https://discourse.vtk.org/t/error-during-vtk-9-3-0-build-from-sources-with-java-wrapper/13538/3 "2024-09-06T13:25:33Z")

</div>

@vbolea

---

<div class="post-metadata">

### Author: ![vbolea](https://discourse.vtk.org/user_avatar/discourse.vtk.org/vbolea/32/4060_2.png) [@vbolea](https://discourse.vtk.org/u/vbolea)
#### Post date: [September 18, 2024, 9:40am UTC](https://discourse.vtk.org/t/error-during-vtk-9-3-0-build-from-sources-with-java-wrapper/13538/4 "2024-09-18T09:40:41Z")

</div>

We have resolved this (along many other changes to the Java Wrappings) in current VTK master, unfortunately it did not make it to 9.3.X and we do not expect another 9.3.X release. In any case this will be included in the incoming 9.4.0 release which is due to next months.

Thanks for reporting this issue.
