VTK编译中出现 no override found for vtkpolydatamapper 解决方法

版本: VTK7.1     VS2013

如果通过visual studio编译而不是cmake编译的的话需要添加代码:

#include "vtkAutoInit.h" 
VTK_MODULE_INIT(vtkRenderingOpenGL2); // VTK was built with vtkRenderingOpenGL2
VTK_MODULE_INIT(vtkInteractionStyle);

下面的两句也可以写成

#define vtkRenderingCore_AUTOINIT 2(vtkRenderingOpenGL2, vtkInteractionStyle)

原因:This initializes the specified VTK modules. CMake includes these by default, but other compilers such as VS do not.



参考:http://stackoverflow.com/questions/18642155/no-override-found-for-vtkpolydatamapper

你可能感兴趣的:(VTK)