I amusing Visual Studio Community 2022 for C++ to install the Visualization Tool Kit (VTK) on a Windows 10 PC.
I literally followed the procedure on the following website Building VTK using Visual Studio on Windows
I downloaded the VTK source code into the "src" folder. I used CMake and Visual Studio. After the building phase the "bin" folder was populated with the VTK library (.dll).
I tested the VTK library installation using the example suggested in the procedure https://kitware.github.io/vtk-examples/site/Cxx/Picking/HighlightPickedActor/
Unluckily, when I run the example with Visual Studio I get the following error message "The code execution cannot proceed because vtkRenderingOpenGL2-9.2.dll was not found. Reinstalling the program may fix this problem" I am not clear about which program should be reinstalled. Is it Visual Studio, or VTK, or the example test?
I tried adding the path of the VTK library (.dll) to my username environment variable PATH. It did not solve the problem.
I tried to install the VTK library (.dll) as a subfolder of Program Files. It did not solve the problem.
I am at my wits' end
Should I try to add the VTK library as part of the References or External Dependencies in Visual Studio?
If the answer is "yes" then how can I do that?
I have some limited experience of Visual Studio with C# for which I had followed some examples showing how to add NuGet packages and dependencies. I have no such experience with C++.
I would appreciate some help at implementing C++ codes that successfully call the VTK library (.dll) for image rendering
Thank you in advance
Maura E. M.