【问题标题】:Unable to run example code with VTK 8.2.0, CMAKE 3.14.6, Visual studio 2015 x64, Windows10无法使用 VTK 8.2.0、CMAKE 3.14.6、Visual Studio 2015 x64、Windows10 运行示例代码
【发布时间】:2019-08-21 13:10:20
【问题描述】:

我正在尝试开始使用 VTK 并下载了最新的源代码 8.2.0。 按照下面的链接编译一个示例。

Building VTK Windows

VTK Set Up in Windows

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

【问题讨论】:

    标签: cmake vtk


    【解决方案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} 的信息。

    【讨论】:

    • 我在 ubuntu 上遇到了同样的问题。运行 make 时,没有任何反应。指定 vtk-config.cmake 所在的目录,无论是在 cmake 文件中还是通过命令行都没有帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-14
    • 2018-05-24
    • 2015-11-17
    • 2017-10-01
    • 1970-01-01
    相关资源
    最近更新 更多