[vtkusers] Migration problem vtk 5.8 - vtk 6.1
lorenzo.cesario at softeco.it
lorenzo.cesario at softeco.it
Tue Jul 1 04:52:58 EDT 2014
Hi,
my application has an executable and some dlls. Among them, there is one dll that used vtk 5.8 and now I'm doing the migration to the vtk 6.1.
I'm using Visual Studio 2010 and my appliation is MFC-based.
In the properties of the dll using vtk, I obviously included the "Additional Include Directories" and "Additional Library" for the vtk header files and .lib files.
Moreover I added in the "Preprocessor definition" field of the C/C++ Property of the same dll, this value: vtkRenderingCore_INCLUDE="InitVtkObjFactory.h" and I added the file InitVtkObjFactory.h with this code:
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL);
VTK_MODULE_INIT(vtkInteractionStyle);
VTK_MODULE_INIT(vtkRenderingFreeType);
VTK_MODULE_INIT(vtkRenderingFreeTypeOpenGL);
When I close the application it crashes and in the call stack there is the last call on vtkCommonCore-6.1.dll.
Then, I removed the line inside the file InitVtkObjFactory.h related to the InteractionStyle as follows:
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL);
VTK_MODULE_INIT(vtkRenderingFreeType);
VTK_MODULE_INIT(vtkRenderingFreeTypeOpenGL);
and in this case, when the application starts, it shows a "warning" window from vtk in which is written:
Warning: In ..\..\..\..\..\src\Vtk\Rendering\Core\vtkInteractorStyleSwitchBase.cxx, line 43
vtkInteractorStyleSwitchBase (07EC7FB8): Warning: Link to vtkInteractionStyle for default style selection.
but when I close the application, this time it has no error or crashes. I'm using a vtkInteractorStyleTrackballCamera for my RenderWindow.
Any ideas? Is there anything wrong in the migration related to the new modules initialization?
Tks,
Lorenzo
More information about the vtkusers
mailing list