[vtkusers] problems linking vtk against external library

Leila Baghdadi baghdadi at sickkids.ca
Wed Mar 3 11:36:42 EST 2004


Hi everyone

I am just wondering if anyone on the list has attempted this and could 
give me a hint.
so I am trying to link vtk against hdf5 and 
minc2(http://www.bic.mni.mcgill.ca/software/minc2/api_doc/minc_20.html)

I have added the following lines to CMakeLists.txt sitting in vtkLocal so 
that I can added my classes but I get the following error

FIND_LIBRARY(HDF5_LIBRARY hdf5 /usr/lib /home/baghdadi/lib)
FIND_PATH(HDF5_INCLUDE_DIR hdf5.h /usr/include /home/baghdadi/include)

 # Create the library.
  ADD_LIBRARY(${PROJECT_NAME} ${vtkLocal_SRCS}  ${vtkLocalInstantiator_SRCS})
  TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${vtkLocal_LIBS} ${HDF5_LIBRARY})

and I get the following weird error
Building object file vtkLocalExample.o...
Building object file vtkImageCanvasSource.o...
Building object file vtkMINC2ImageReader.o...
Building object file vtkLocalInstantiator.o...
make[1]: *** No rule to make target
`/home/baghdadi/VTK/Examples/Build/vtkLocal/bin/lib/home/baghdadi/lib/libhdf5.so.so',
 needed by 
`/home/baghdadi/VTK/Examples/Build/vtkLocal/bin/libvtkLocal.so'.


thanks


Leila




More information about the vtkusers mailing list