Error no override found for vtkPolyDataMapper
例:
PCL中使用VTK时出现GenericWarning:InC:\Build\3rdParty\x64\VTK8.0.0\Rendering\Core\vtkPolyDataMapper.cxx, line 28
Error: no override found for ‘vtkPolyDataMapper’.
解决方案:
1、确认 gl 版本 ,首先查看你的pcl目录下的OpenGL的版本
可以确认是 opengl 非 opengl2
添加头文件后
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL);
VTK_MODULE_INIT(vtkInteractionStyle);
如:
是这种 vtkRenderingOpenGL2, 说明是 opengl2
头文件后添加
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);
2. 接下来在属性的的链接器——输入——附加依赖项添加opengl32.lib