[Paraview-developers] Not all VTK libraries resolved correctly
Matthias Schneider
schneider at vision.ee.ethz.ch
Wed Jul 10 04:10:27 EDT 2013
Hi,
I ran into some issues when trying to use VTK compiled from the latest
ParaView sources (v4.0.1) as shared libs. For some reason, some of the
vtk libraries stored in the VTK_LIBRARIES variable when loading the VTK
package from within cmake cannot be resolved correctly even though they
are present in the paraview build directory (<pv build dir>/lib) I get
my code compiled only when manually excluding some of the libraries that
cannot be resolved:
# VTK
FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})
# manually exclude shared libs that cannot be resolved correctly
LIST(REMOVE_ITEM VTK_LIBRARIES
vtkPointSpriteRendering
vtkPointSpriteGraphics
vtkQvis
vtkUtilitiesPythonInitializer
vtkEyeDomeLighting)
ADD_EXECUTABLE(myTest myTest.cxx)
TARGET_LINK_LIBRARIES(myTest ${VTK_LIBRARIES})
I am not really familiar with the cmake mechanism to resolve the shared
libs. The VTK_LIBRARIES variable contains the 'raw' library name (e.g.
vtkCommonCore) whereas the linker arguments contain the library with the
correct paraview suffix (e.g. libvtkCommonCore-pv4.so).
The hole link command (without the list remove command) then looks
something like that:
/usr/bin/g++ [...] <pv build>/lib/libvtkCommonCore-pv4.0.so.1 [...]
-lvtkPointSpriteRendering -lvtkPointSpriteGraphics [...] -c myTest.cxx
This of course ends up in a linker error as the vtk libs linked with -l
cannot be resolved. Does anybody have a hint why this might happen or
where/how to fix this to avoid the list remove command? To me it seems
like these are mostly/all (?) paraview plugin classes that are affected
here.
Paraview/VTK has been compilied on a 64-bit linux system with the
following changes applied to the default cmake config:
CMAKE_BUILD_TYPE -> Release
PARAVIEW_ENABLE_PYTHON -> ON
Module_vtkFiltersImaging -> ON
Module_vtkImagingMath -> ON
Module_vtkImagingStatistics -> ON
Module_vtkInfovisBoost -> ON
Module_vtkInfovisBoostGraphAlg -> ON
VTK_Group_Imaging -> ON
VTK_LEGACY_REMOVE -> ON
Any help is appreciated very much. Thanks a lot!
Best,
Matthias
More information about the Paraview-developers
mailing list