[vtkusers] libraries VTK 6.X +

Cory Quammen cory.quammen at kitware.com
Wed Oct 12 11:55:37 EDT 2016


Hi Marc-Michel,

VTK 6 libraries changed substantially from VTK 5 with a finer-grained
modularization of classes into a larger number of libraries. The easiest
solution is to change

TARGET_LINK_LIBRARIES(project
    vtkCommon
    vtkFiltering
    vtkGraphics
    vtkIO
)

to

TARGET_LINK_LIBRARIES(${VTK_LIBRARIES})

HTH,
Cory

On Wed, Oct 12, 2016 at 11:40 AM, Marc-Michel Rohé <
marc-michel.rohe at inria.fr> wrote:

> Hello,
>
> I am working on a project which was initially built using VTK 5.X with the
> following command using CMake:
>
>   FIND_PACKAGE(VTK)
>   IF(VTK_FOUND)
>     INCLUDE(${VTK_USE_FILE})
>   ELSE(VTK_FOUND)
>     MESSAGE(FATAL_ERROR "VTK not found. Please set VTK_DIR.")
>   ENDIF(VTK_FOUND)
>
> TARGET_LINK_LIBRARIES(project
>     vtkCommon
>     vtkFiltering
>     vtkGraphics
>     vtkIO
> )
>
> I tried to now use VTK6.X version for the code but it seems that the
> libraries libvtkFiltering.so, libvtkCommon.so, libvtkIO.so,
> libvtkGraphics.so are not built anymore in the VTK folders bin so that when
> I try to compile my projects I get the error:
>
> [ 32%] Linking CXX shared library ../../../lib/libproject.so
> /usr/bin/ld: cannot find -lvtkCommon
> /usr/bin/ld: cannot find -lvtkFiltering
> /usr/bin/ld: cannot find -lvtkGraphics
> /usr/bin/ld: cannot find -lvtkIO
>
> Is there a special option to check during the VTK compilation so that I
> get these libraries ? I used the same option that for VTK 5.X so I don't
> understand...
>
> Thx
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161012/cd9824a7/attachment.html>


More information about the vtkusers mailing list