# Missing dlls after building vtk 7.1.1. on Windows using cmake and Visual Studio 15 (2017)

**URL:** https://discourse.kitware.com/t/missing-dlls-after-building-vtk-7-1-1-on-windows-using-cmake-and-visual-studio-15-2017/1162
**Category:** Uncategorized
**Created:** [November 25, 2023, 4:49am UTC](https://discourse.kitware.com/t/missing-dlls-after-building-vtk-7-1-1-on-windows-using-cmake-and-visual-studio-15-2017/1162 "2023-11-25T04:49:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![reydv](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@reydv](https://discourse.kitware.com/u/reydv)
#### Post date: [November 25, 2023, 4:49am UTC](https://discourse.kitware.com/t/missing-dlls-after-building-vtk-7-1-1-on-windows-using-cmake-and-visual-studio-15-2017/1162/1 "2023-11-25T04:49:41Z")

</div>

I am building VTK 7.1.1 on a Windows machine using cmake and Visual Studio 15 (2017) for use in a java project. The java version I am suing is jdk\_12.0.2.

I follow this procedure: [https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/dev/build\_windows\_vs.md](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/dev/build_windows_vs.md)

I use cmake-gui (version 3.23.2) to configure and generate the Visual Studio solution to build VTK. Since I want to build the java libraries (vtk\*.jar and the dlls, including various vtk\*java.dlls), I turn on the following flags: Module\_vtkWrappingJava, VTK\_WRAP\_JAVA. In addition, I also turn on VTK\_USE\_CXX11\_FEATURES.

Both the ALL\_BUILD and INSTALL builds are reported as successful by Visual Studio, with all successes and no failed builds for any of the items.

The vtk 7.1.1 source code has some java examples, including a few to display a cone and manipulate. When I try to compile and run, for the example, Examples\Tutorial\Step1\Java\Cone.java from the exampled packaged with vtk 7.1.1, it fails due to some missing dlls. Cone.java loads the following dlls in the static block:

> System.loadLibrary(“vtkCommonJava”);  
> System.loadLibrary(“vtkFilteringJava”);  
> System.loadLibrary(“vtkIOJava”);  
> System.loadLibrary(“vtkImagingJava”);  
> System.loadLibrary(“vtkGraphicsJava”);  
> System.loadLibrary(“vtkRenderingJava”);

I see all of these dlls are missing in the build or the installation folder. Under the installation folder, I see vtk-7.1.jar and vtk-7.1-natives-Windows-AMD64.jar. There is also a natives-Windows-AMD64 folder that contains nearly 200 dlls, including msvcp140\*.dll and a lot of vtk\*.dlls. But i do not see vtkCommonJava.dll, vtkFilteringJava.dll, vtkIOJava.dll, vtkImagingJava.dll, vtkGraphicsJava.dll and vtkRenderingJava.dll, which are required by the example Cona.java packed with the vtk7.1.1 source code. I also see a bin and a lib folder but both these folder only contains a vtkLocalExample.lib and a vtkLocalExampleJava.lib.

Are these missing dlls supposed to be built by the building process in Visual Studio?. If so, are there any flags I should turn on in cmake-gui (to generate the Visual Studio project) that I am not turning on?

Or are these dlls supposed to come from somewhere else I need to download?

Or is this not the procedure to build vtk with java wrapping?.

I searched online including on stackoverflow, but couldn’t find anything related to these missing dlls. If this is covered in a previous thread here, can you point me to it?

When configuring the Visual Studio project for building vtk 7.1.1. using cmake-gui, these are the flags I turned on iteratively until I saw a cmake Window without any red items. Then I clicked on Generate to create the vtk project and then used Visual Studio 15 (2017) community edition to build.

BUILD\_EXAMPLES  
BUILD\_TESTING  
CMAKE\_CXX\_MP\_FLAG  
Module\_vtkWrappingJava  
VTK\_USE\_CXX11\_FEATURES  
VTK\_WRAP\_JAVA  
VTK\_USE\_LARGE\_DATA  
VTK\_JAVA\_INSTALL  
VTK\_JAVA\_SOURCE\_VERSION: 1.8  
VTK\_JAVA\_TARGET\_VERSION: 1.8

At the end of the successful build process, I expected to find vtk\*.jar and the dlls to use vtk in java projects. I couldn’t run all the packaged java examples and so I am wondering where I went wrong in the build process.

Thanks!
