vtk6.3 link error:no override found for 'vtkRenderWindow'

依然范特西╮ 提交于 2019-12-23 05:49:05

问题


I hava built vtk6.3 with qt5.5 on ubuntu 64bit,and I open an example with qtcreator.Build it,then link error occur:

Generic Warning: In /VTK/Rendering/Core/vtkRenderWindow.cxx, line 40 Error: no override found for 'vtkRenderWindow'.

The line 40 with doc:

//Use the vtkAbstractObjectFactoryNewMacro to allow the object factory overrides. vtkAbstractObjectFactoryNewMacro(vtkRenderWindow)

I google for this problem,almost all explanation is about this link,it seems I must add this macro in my cpp file to enable the factory methord:

include <vtkAutoInit.h> VTK_MODULE_INIT(vtkRenderingWindow)

But I got another error:

error: undefined reference to `vtkRenderingWindow_AutoInit_Construct()' error: undefined reference to `vtkRenderingWindow_AutoInit_Destruct()'

I can't find any built library define these symbols,google it and I got almost nothing.I am new to vtk,can anyone give some help?


回答1:


Use VTK_MODULE_INIT(vtkRenderingOpenGL) instead of VTK_MODULE_INIT(vtkRenderingWindow). It works for me.



来源:https://stackoverflow.com/questions/33770279/vtk6-3-link-errorno-override-found-for-vtkrenderwindow

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!