[vtkusers] still qvtk problem

Clinton Stimpson clinton at elemtech.com
Fri Jul 1 12:27:09 EDT 2005


> Hi all,
>   I linked the lQVTK first, and then the others. But still it is showing 
> the same kind of error:
> 
>  /usr/local/lib/vtk/libvtkRendering.a(vtkRenderWindow.o)(.text+0x1bb8): 
> In function `vtkRenderWindow::DoFDRender()':
> : undefined reference to `vtkTransform::New()'
> /usr/local/lib/vtk/libvtkRendering.a(vtkRenderWindow.o)(.text+0x1cc8): 
> In function `vtkRenderWindow::DoFDRender()':
> : undefined reference to `vtkTransform::Identity()'
> .....

Your link order is still wrong.  The linker is trying to resolve symbols for libvtkRendering.a, but can't resolve it for any libraries that follow libvtkRendering.a.  vtkTransform is defined in libvtkCommon.a.
So to satisfy the above, you have to specify -lvtkRendering *before* -lvtkCommon.  That's normal linking behavior for pretty much any platform but Windows.

> Since I am using qmke, so here is my .qmake.cache file:

> INCLUDEPATH     += /usr/local/include/vtk
> LIBS            += -L/usr/local/lib/vtk \
>                 -lQVTK \
>                 -lvtkCommon \
>                 -lvtkFiltering \
>                 -lvtkGenericFiltering \
>                 -lvtkfreetype \
>                 -lvtkDICOMParser \
>                 -lvtkexpat \
>                 -lvtkftgl \
>                 -lvtkGraphics \
>                 -lvtkHybrid \
>                 -lvtkIO \
>                 -lvtkImaging \
>                 -lvtksys \
>                 -lvtkRendering \
>                 -lvtkVolumeRendering \
>                 -lvtkjpeg \
>                 -lvtkpng \
>                 -lvtkzlib \
>                 -lvtktiff

Do this instead

LIBS            += -L/usr/local/lib/vtk \
                -lQVTK \
                -lvtkHybrid \
                -lvtkVolumeRendering \
                -lvtkIO \
                -lvtkRendering \
                -lvtkGenericFiltering \
                -lvtkGraphics \
                -lvtkImaging \
                -lvtkFiltering \
                -lvtkCommon \
                -lvtkftgl \
                -lvtkfreetype \
                -lvtkDICOMParser \
                -lvtkexpat \
                -lvtksys \
                -lvtktiff \
                -lvtkjpeg \
                -lvtkpng \
                -lvtkzlib



Clint





More information about the vtkusers mailing list