# Shared Library Names

**URL:** https://discourse.vtk.org/t/shared-library-names/9767
**Category:** Support
**Created:** [November 8, 2022, 10:07am UTC](https://discourse.vtk.org/t/shared-library-names/9767 "2022-11-08T10:07:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![henrydeere](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/db5fbb/32.png) [@henrydeere](https://discourse.vtk.org/u/henrydeere)
#### Post date: [November 8, 2022, 10:07am UTC](https://discourse.vtk.org/t/shared-library-names/9767/1 "2022-11-08T10:07:00Z")

</div>

I’ve installed vtk version 9.1.0-r4 on my linux system using the package manager, and have also compiled version 9.1.0-r4 from source

The package manager installed version has libraries:  
libvtkCommon-9.1.so  
libvtkRendering-9.1.so  
libvtkInteraction-9.1.so  
libvtkFilters-9.1.so

The self-compiled version has libraries:  
libvtkCommon **Core** -9.1.so  
libvtkRendering **Core** -9.1.so  
libvtkInteraction **Style** -9.1.so  
libvtkFilters **Core** -9.1.so

Is there a CMake option to choose one naming convention or the other? The project I am incorporating vtk into doesn’t use CMake, so I can’t rely on automatic library discovery to bypass the naming issue. Tried diffing the CMakeCache.txt files, but nothing was immediately obvious.

---

<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: [November 8, 2022, 1:59pm UTC](https://discourse.vtk.org/t/shared-library-names/9767/2 "2022-11-08T13:59:37Z")

</div>

It looks like the package manager enabled “kits”. This is a flag to minimize the number of share libraries on the system. It’s intended for HPC systems where filesystem access to load libraries doesn’t scale well with the number of files to open.

Note that using VTK (especially 9+) requires some level of CMake in order to have object factories work. This is the mechanism whereby you request a `vtkOpenGLRenderWindow` and actually get an X-using subclass. Something like [this tool for ParaView](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Clients/CommandLineExecutables/paraview-config.in) could be adapted to work for VTK as well.

---

<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: [November 8, 2022, 4:18pm UTC](https://discourse.vtk.org/t/shared-library-names/9767/3 "2022-11-08T16:18:33Z")

</div>

Oh, that tool still doesn’t get you autoinit stuff. Non-CMake projects will need that to be manual. But it can at least get the compile and link flags necessary.

---

<div class="post-metadata">

### Author: ![henrydeere](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/db5fbb/32.png) [@henrydeere](https://discourse.vtk.org/u/henrydeere)
#### Post date: [November 9, 2022, 6:30pm UTC](https://discourse.vtk.org/t/shared-library-names/9767/4 "2022-11-09T18:30:35Z")

</div>

` -DVTK_ENABLE_KITS=ON` was what I was after, thank you.

Manually specifying the required vtk libraries in a makefile seems to work for the functionality I’m after. I did discover the need to specify the autoinit manually to get OpenGL rendering. It was a puzzling exercise to figure out why rendering wasn’t working until I found out that CMake injects headers during the build.

```auto
#define vtkRenderingCore_AUTOINIT 3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL2)
#define vtkRenderingOpenGL2_AUTOINIT 1(vtkRenderingGL2PSOpenGL2)

```
