问题
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