本文介绍了找不到vtkRenderer / vtkRenderWindow的替代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是vtk的新手,在运行一个小示例时,它会产生两个错误,
I'm new to vtk and when I was running a small example, it generates two errors,
没有找到vtkRenderWindow的替代项
No override found for vtkRenderWindow
我在这个问题上用谷歌搜索了,无法找不到合适的解决方案。
I googled this problem and couldn't find a proper solution.
推荐答案
当我尝试在没有CMake的情况下创建VTK项目时遇到了这样的问题,解决方案是使用这两行:
I had such a problem when I was trying to make a VTK project without CMake, the solution was to use those two lines:
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL2)
因此,如果您使用的是CMake,则可能已经跳过了一些在构建VTK环境时采取步骤。
So if you are using CMake, then you probably have skipped some step while building your VTK environment.
这篇关于找不到vtkRenderer / vtkRenderWindow的替代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!