[vtk-developers] NULL always returned from vtkPolyDataMapper::New()

Kyle Lutz kyle.lutz at kitware.com
Mon Nov 12 16:09:08 EST 2012


Hello everyone,

I'm trying to write a small reproducible test case for a bug I'm
working on but I can't even get a simple visualization pipeline
running. When I try to create a vtkPolyDataMapper I always get NULL
returned. I've looked through the wiki and at the VTK6 migration guide
but can't find anything related to what I'm seeing.

I'm sure I'm doing something wrong but I can't seem to figure out:

=== main.cpp ===
#include <cassert>
#include <vtkPolyDataMapper.h>

int main()
{
  vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
  assert(mapper != 0);
  return 0;
}

=== CMakeLists.txt ===
find_package(VTK REQUIRED)
include_directories(${VTK_INCLUDE_DIRS})

add_executable(test main.cpp)
target_link_libraries(test vtkRenderingCore)

Platform: Ubuntu Linux, 64-bit, GCC 4.6.3, VTK from gerrit/master (as
of this morning)

I've also tried changing the link line to ${VTK_LIBRARIES} (which
gives the same assertion error) and vtkHybrid (which gives a
"-lvtkHybrid" not found error when linking).

Any help would be greatly appreciated.

Thanks,
Kyle



More information about the vtk-developers mailing list