[vtkusers] VTK 6 porting

Cory Quammen cquammen at cs.unc.edu
Fri Mar 15 12:35:24 EDT 2013


After the line

find_package( VTK ... )

in your project's CMakeLists.txt file, you need to add the line

include( ${VTK_USE_FILE} )

- Cory

On Fri, Mar 15, 2013 at 11:54 AM, Frédéric Speisser
<speisser at kappaeng.com> wrote:
> Hello all,
>
> We want to port our application using Vtk 5.9 to Vtk 6.
> Some code working on 5.9 does not work in 6, simple example with following
> line :
>
> vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
>
> returns a NULL pointer ...
>
> Seems I must do something described here
> http://www.vtk.org/Wiki/VTK/Build_System_Migration :
>
>
> "The application code must list vtkRenderingOpenGL in its components to use
> OpenGL for rendering and include the VTK_USE_FILE to add compiler
> definitions. This ensures that the object factory for the vtkRenderingOpenGL
> module will be initialized and uses whenever classes from vtkRenderingCore
> are uses in your application code. If you notice the interface classes in
> these modules returning NULL pointers it is likely that one of these
> implementation modules providing appropriate overrides is missing from the
> dependency list."
>
> I'm already linking with vtkRenderingOpenGL-6.0.lib in my sample project but
> what should i do with "VTK_USE_FILE" ?
>
> Any hints would be wellcome, thanks a lot !
>
>
> Frédéric
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



--
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill



More information about the vtkusers mailing list