我正在尝试开始使用VTK并下载了最新的源代码8.2.0。 通过以下链接可以编译示例示例。
Install VTK with visual studio
Compile VTK 8.2.0 with Visual Studio 2019 under Windows 10
我已经在指定位置成功安装了VTK,没有任何错误,但是当我尝试构建示例示例时,每次运行CMAKE
时,都会遇到错误。
Skipping SimplePointsReader
CMAKE窗口显示以下消息
Selecting Windows SDK version to target Windows 10.0.17134.
The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Skipping SimplePointsReader:
Configuring done
当我生成示例解决方案并构建解决方案时,它不会生成任何exe
。环境变量中的路径已正确更新为安装VTK
的文件夹。
我的系统信息如下:
VTK Source 8.2.0
CMAKE 3.14.6
Visual studio Professional 2015 Version 14.0.25431.01 Update 3
Windows10 Enterprise x64
Not configuring with QT
答案 0 :(得分:1)
似乎CMake无法独自找到您的VTK安装。我假设您正在尝试编译此example。
您可以通过在CMake GUI中设置var VTK_DIR
来手动告诉CMake VTK在哪里。您将必须指定包含文件VTKConfig.cmake
的文件夹。
它位于${your_vtk_install}/lib/cmake/vtk-${vtk_version}/
下:
如果可行,CMake应该告诉您类似VTK_VERSION: ${vtk_version}
的信息。