[vtkusers] VTK 6.0 static New() function returns NULL

Marcus D. Hanwell marcus.hanwell at kitware.com
Thu Apr 18 12:08:52 EDT 2013


On Thu, Apr 18, 2013 at 12:01 PM, Dan Lipsa <dan.r.lipsa at gmail.com> wrote:
> Sebastien,
> I am using a qt project and vtk. I ended up using the following line in the
> .pro file:
>
> DEFINES +=
> vtkRenderingCore_AUTOINIT=\"4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)\"

To remove some of the mystery from it, this just means that you would
like to auto-initialize 4 modules for the vtkRenderingCore module -
namely vtkInteractionStyle, vtkRenderingFreeType,
vtkRenderingFreeTypeOpenGL and vtkRenderingOpenGL.
>
> The list of features in the DEFINES depends on what vtk features you use in
> your program. I figured them out using trial and error from examples for
> those features. I used cmake to generate the proper makefile and then looked
> in that makefile.
>
You could add message("VTK defines: ${VTK_DEFINITIONS}") to a CMake
file if you would like to extract the proposed compiler definitions
and export them to another build system. Hopefully that will make
things easier for others wanting to go this route.

Marcus



More information about the vtkusers mailing list