[Insight-users] compilation problem (itkCurvatureFlowToVTK.cxx)

Luis Ibanez luis.ibanez@kitware.com
Fri, 03 Jan 2003 17:38:04 -0500


Hi Silvester,


Updating FLTK should not affect this particular program.

itkCurvatureFlowToVTK is an example of communication between
ITK and VTK. It is in the directory:  Insight/Auxiliary/vtk

This program illustrates how to connect VTK and ITK pipelines.

It does not use FLTK....

So, something else should have changed in addition to your
upgrade of FLTK.

The error messages are actually complaining about VTK missing
symbols. That looks like a VTK library is missing from the
command line intended for the linker.

A possible reason is that you compiled ITK refering to a
specific version of VTK and then your configuration is
trying to link against another VTK version.

It looks like the VTK version used for link is in :

      -L/home/czanner/install/VTK/bin

I would suggest you to

1) rerun CMake and verify that the selected
    VTK version is the one that you want to use.

2) The select in CMake 'configure', 'generate'.

3) Go to the binary directory of Auxiliary/vtk
    and "make clean"

4) the do  "make"

This should regenerate the .o files and hopefuly
catch a consitent set of VTK libraries.


Please let us know if you find further problems.



   Thanks


     Luis


-------------------------------------

Silvester Czanner wrote:

> Luis,
> 
> I have again a compilation problem. I have updated the FLTK 1.1 to 1.2 
> and now I can not compile the ITK examples with VTK and FLTK.  I am 
> using VTK 4.x Nightly Release. Can you, please, help me. Thank you.
> 
> Silvester
> 
> c++ -rdynamic -ftemplate-depth-50 itkCurvatureFlowToVTK.o  
> -L/home/czanner/install/ITKv1/Insight/bin 
> -L/home/czanner/install/VTK/bin -lpthread -ldl -lpthread -ldl -lm -lGL 
> -lXt  -lSM -lICE  -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -ldl -lm 
> -lGLU -lGL -lXt  -lSM -lICE  -L/usr/X11R6/lib -lX11 -lXext -lm 
> -lvtkRendering -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering 
> -lvtkCommon -lVXLNumerics -lITKCommon -lITKBasicFilters -lvtkpng 
> -lvtkzlib -lvtkftgl -lvtkfreetype -lvtktiff -lvtkzlib -lvtkjpeg 
> -lvtkexpat -lITKCommon -lVXLNumerics -lGL -lXt  -lSM -lICE  
> -L/usr/X11R6/lib -lX11 -lXext -lpthread -lm -ldl 
> -Wl,-rpath,/home/czanner/install/ITKv1/Insight/bin:/home/czanner/install/VTK/bin  
> -o /home/czanner/install/ITKv1/Insight/bin/itkCurvatureFlowToVTK
> itkCurvatureFlowToVTK.o: In function `main':
> itkCurvatureFlowToVTK.o(.text+0x23c): undefined reference to 
> `vtkImageImport::New()'
> itkCurvatureFlowToVTK.o(.text+0x2a3): undefined reference to 
> `vtkImageShiftScale::New()'
> itkCurvatureFlowToVTK.o(.text+0x2b4): undefined reference to 
> `vtkImageSource::GetOutput()'
> itkCurvatureFlowToVTK.o(.text+0x30b): undefined reference to 
> `vtkImageActor::New()'
> itkCurvatureFlowToVTK.o(.text+0x31f): undefined reference to 
> `vtkImageSource::GetOutput()'
> itkCurvatureFlowToVTK.o(.text+0x345): undefined reference to 
> `vtkRenderer::New()'
> itkCurvatureFlowToVTK.o(.text+0x350): undefined reference to 
> `vtkRenderWindow::New()'
> itkCurvatureFlowToVTK.o(.text+0x35b): undefined reference to 
> `vtkRenderWindowInteractor::New()'
> itkCurvatureFlowToVTK.o(.text+0x3a1): undefined reference to 
> `vtkRenderWindow::AddRenderer(vtkRenderer*)'
> itkCurvatureFlowToVTK.o(.text+0x3b9): undefined reference to 
> `vtkRenderWindowInteractor::SetRenderWindow(vtkRenderWindow*)'
> itkCurvatureFlowToVTK.o: In function `vtkRenderer::AddActor(vtkProp*)':
> itkCurvatureFlowToVTK.o(.gnu.linkonce.t._ZN11vtkRenderer8AddActorEP7vtkProp+0x14): 
> undefined reference to `vtkViewport::AddProp(vtkProp*)'
> collect2: ld returned 1 exit status
> make[5]: *** 
> [/home/czanner/install/ITKv1/Insight/bin/itkCurvatureFlowToVTK] Error 1
> make[4]: *** [default_target] Error 2
> make[3]: *** [default_target_vtk] Error 2
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_Auxiliary] Error 2
> make: *** [default_target] Error 2
> [czanner@gabi Insight]$
>