List of dll/dylibs

Hi everyone,

I was wondering if there is a way to know beforehand the name of the dll/dylibs to link to the executable for a certain class. For example I was interested in the vtkResampleToImage class and I wanted to know which dylib to link to use it without linking everything in /lib.

I unfortunately can’t use cmake as a build tool, so I am compiling with g++ and linking the dylibs by myself when I need a new function. It works wonderfully but sometimes I struggle to find the names of the dylibs

Thank you a lot

Hello,

Generally, the directory structure of the VTK source code gives you a hint of which library the given class resides in. For vtkResampleToImage, search for the vtkResampleToImage.h file. You’ll find it in <VTK-src>/Rendering/Image, so, the library name is libvtkRenderingImage-9.1.dll/so/dylib if VTK is of version 9.1.

Notice that the libraries may themselves depend on other VTK libraries. In that case, you are better off by using something like Dependency Walker for Windows. For MacOS, you may be interested in this: windows - Discovery of Dynamic library dependency on Mac OS & Linux - Stack Overflow .

take care,

PC