[Insight-developers] using vtk from itk

debbie larson debbielarson_9 at hotmail.com
Wed Oct 18 18:48:25 EDT 2006


Hi,

Sorry this is a basic question. I have Itk and Vtk installed. I would like 
to call vtk classes from itk code (C++). I added the following to my 
CMakeLists.txt file in my itk project dir

# Find VTK.
SET ( VTK_DIR /home/zona/RESEARCH_SUMMER_2006/VTK-BUILD )
INCLUDE ( ${CMAKE_ROOT}/Modules/FindVTK.cmake )
IF ( USE_VTK_FILE )
   INCLUDE ( ${USE_VTK_FILE} )
ENDIF ( USE_VTK_FILE )

When I make my itk code it will compile fine but it will not link. I get
Linking CXX executable Vis
CMakeFiles/Vis.dir/Vis.o: In function `main':
CMakeFiles/Vis.dir/Vis.o(.text+0xb5): undefined reference to 
`vtkImageReader2::New()'


What else do I need to do?

Thanks

deb

_________________________________________________________________
Get FREE company branded e-mail accounts and business Web site from 
Microsoft Office Live 
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/



More information about the Insight-developers mailing list