[vtkusers] vtkPLYWriter and polydata

David Doria daviddoria at gmail.com
Mon Sep 17 08:01:43 EDT 2012


On Mon, Sep 17, 2012 at 7:45 AM, cerina <cerine-baratelli at hotmail.fr> wrote:
>
>
> David Doria-2-3 wrote
> >
> > That is a linker error. What does your CMakeLists.txt file look like?
> >
> > David
> >
> thanks for reply. this is my CMakeLists.txt file :
> INCLUDE_DIRECTORIES(
>     ${VTK_INCLUDE_DIR}
>     ${VTKSURFACE_INCLUDE_DIR}
> )
>
> ADD_EXECUTABLE(Octree Octree.cxx vtkOctree.cxx)
>
> TARGET_LINK_LIBRARIES(Octree vtkSurface
>             vtkCommon
>             vtkFiltering
>             vtkGraphics
>             vtkImaging
>             vtkIO
>             vtkRendering
>             vtkWidgets
> vtkHybrid)


Is that the whole file?

You should certainly have lines like:

find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

and then:

target_link_libraries(ParticleReader ${VTK_LIBRARIES})

(Every example on the wiki has an almost identical CMakeLists.txt, for
example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ParticleReader )

David



More information about the vtkusers mailing list