I encountered errors!
after generating VTK.sln in build tree with cmake, I compiled my build tree(built from VTK source) with VS2022, then the errors show:
Error LNK2019 unresolved external symbol “public: bool __cdecl vtk::detail::smp::vtkSMPToolsImpl<1>::IsParallelScope(void)” (?IsParallelScope@?$vtkSMPToolsImpl@$00@smp@detail@vtk@@QEAA_NXZ) referenced in function “public: bool __cdecl vtk::detail::smp::vtkSMPToolsAPI::IsParallelScope(void)” (?IsParallelScope@vtkSMPToolsAPI@smp@detail@vtk@@QEAA_NXZ) vtkProbeOpenGLVersion D:\VTK\build-9.3.1\Rendering\OpenGL2\vtkCommonCore-9.3.lib(vtkSMPToolsAPI.obj) 1
Error LNK1120 1 unresolved externals vtkProbeOpenGLVersion D:\VTK\build-9.3.1\bin\Release\vtkProbeOpenGLVersion-9.3.exe 1
more details:
in cmake, the generator is VS2022, and I unchecked the BUILD_SHARED_LIBS option in cmake-gui to obtain static libs.
in VS2022, I set the configurations to be “Release”,“x64”. the c++ standard is C++14.
the vtk version is 9.3.1.