[vtkusers] Linker errors after upgrading to vtk 5.6.1

Joseph D. Wieber Jr. jdwieber at gmail.com
Thu Aug 4 12:26:08 EDT 2011


The only way to get my app to compile is to add all the libs to the LIBS 
variable thus:

LIBS += -lCosmo \
         -lMapReduceMPI \
         -lmpistubs \
         -lQVTK \
         -lVPIC \
         -lvtkalglib \
         -lvtkCharts \
         -lvtkCommon \
         -lvtkDICOMParser \
         -lvtkexoIIc \
         -lvtkexpat \
         -lvtkFiltering \
         -lvtkfreetype \
         -lvtkftgl \
         -lvtkGenericFiltering \
         -lvtkGeovis \
         -lvtkGraphics \
         -lvtkHybrid \
         -lvtkImaging \
         -lvtkInfovis \
         -lvtkIO \
         -lvtkjpeg \
         -lvtklibxml2 \
         -lvtkmetaio \
         -lvtkNetCDF \
         -lvtkNetCDF_cxx \
         -lvtkParallel \
         -lvtkpng \
         -lvtkproj4 \
         -lvtkQtChart \
         -lvtkRendering \
         -lvtksqlite \
         -lvtksys \
         -lvtktiff \
         -lvtkverdict \
         -lvtkViews \
         -lvtkVolumeRendering \
         -lvtkWidgets \
         -lvtkzlib

This seems out of the ordinary since I only use a handful of vtk classes 
in my app.

On 08/04/2011 11:59 AM, Joseph D. Wieber Jr. wrote:
>
> Hi all,
>
> I upgraded to vtk5.6.1 (using cmake) and tried to rebuild an existing 
> Qt based project, and now I'm getting 717 link errors.  I verified my 
> paths in the qmake file, and environment, are correct.  In vtk5.4 I 
> only needed to link against -lvtkCommon -lvtkRendering 
> -lvtkVolumeRendering -lQVTK.  With 5.6.1 I get a slew of warnings of 
> the form:
>
> /usr/bin/ld: warning: libvtksys.so.5.6, needed
> by /usr/lib/vtk-5.6/libvtkCommon.so, not found (try using -rpath
> or -rpath-link)
>
> followed by 717 undefined reference errors.  So, I add the unfound 
> library named in the to the list, but then the link error count goes 
> up.  It seems strange that I should be getting all these linker 
> errors.  Any idea what could be wrong?  I'm using qmake from within 
> the Qt Creator IDE.  Below is my .pro file.  In the build settings I 
> have the variable 
> LIBRARY_PATH=:/usr/lib/nvidia-current:/usr/lib/vtk-5.6.  I also tried 
> adding -L/usr/lib/vtk-5.6 to the LIBS variable, but that didn't help 
> either.  Could it be possible that I need to have all 36 libraries 
> listed to link against?  Note, in the warning above ld knows the 
> correct path to the vtk shared libs.
>
> .pro file:
>
> #-------------------------------------------------
> #
> # Project created by QtCreator 2011-07-10T16:15:44
> #
> #-------------------------------------------------
>
> QT       += core gui
>
> TARGET = SummerIS2011
> TEMPLATE = app
>
>
> SOURCES += main.cc\
>     MainWindow.cc \
>     PixelNode.cc \
>     IntelligentScissors.cc \
>     CvUtils.cc \
>     ScreenPicker.cc \
>     StringUtils.cc \
>     Convert.cc
>
> HEADERS  += MainWindow.h \
>     Defines.h \
>     CvUtils.h \
>     PixelNode.h \
>     IntelligentScissors.h \
>     Array2d.h \
>     Vec.h \
>     ScreenPicker.h \
>     StringUtils.h \
>     Convert.h
>
> FORMS    += MainWindow.ui
>
> INCLUDEPATH += /usr/include/vtk-5.6
>
> LIBS += -lvtkCommon \
>     -lvtkRendering \
>     -lvtkVolumeRendering \
>     -lQVTK
>
>
>
> Regards,
>
> /joseph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110804/0fa6c6ab/attachment.htm>


More information about the vtkusers mailing list