[vtk-developers] compilation and link errors in 3rd part application due to recent changes in VTK

Arnaud GELAS arnaud_gelas at hms.harvard.edu
Tue Dec 14 15:13:00 EST 2010


Hi Dave,

thanks!!!

The code is public and accessible here:

     $ git clone git://github.com/gofigure2/GoFigure2.git

but it does require VTK to be compiled with Qt and MySQL...

Let me know if you want me to create a smaller project to track this issue!

Best,
Arnaud

On 12/14/2010 03:06 PM, Dave Partyka wrote:
> Hi Arnaud,
>
> This must be due to my switch over to use CMake exports. Can you share 
> your code that is breaking so I can reproduce the error?
>
>
> On Tue, Dec 14, 2010 at 2:43 PM, Arnaud GELAS 
> <arnaud_gelas at hms.harvard.edu <mailto:arnaud_gelas at hms.harvard.edu>> 
> wrote:
>
>     Except tons of linking errors somehow related to (now?) missing
>     libraries in the target_link_libraries,
>      for couples of my target, I get the following new link error:
>
>     /usr/bin/ld:
>     /home/ajg23/BUILD/Static/Debug/VTK/bin/libQVTK.a(QVTKWidget.cxx.o): undefined
>     reference to symbol 'XGetWindowAttributes'
>     /usr/bin/ld: note: 'XGetWindowAttributes' is defined in DSO
>     /usr/lib64/libX11.so.6 so try adding it to the linker command line
>     /usr/lib64/libX11.so.6: could not read symbols: Invalid operation
>
>
>     On 12/14/2010 02:23 PM, Arnaud GELAS wrote:
>
>         Here are the first link errors, by doing make -j12
>
>         make[1]: ***
>         [Examples/ExternalCode/MegaVTK/CMakeFiles/vtkviewimage3dtest.dir/all]
>         Error 2
>         /usr/bin/ld: cannot find -lvtkHybrid
>         /usr/bin/ld: cannot find -lvtkCommon
>         /usr/bin/ld: cannot find -lvtkRendering
>         /usr/bin/ld: cannot find -lvtkWidgets
>         /usr/bin/ld: cannot find -lvtkVolumeRendering
>         /usr/bin/ld: cannot find -lvtkHybrid
>         /usr/bin/ld: cannot find -lvtkImaging
>         collect2: ld returned 1 exit status
>
>         It seems that I now need to add VTK_LIBRARY_DIRS to the list of
>         LINK_DIRECTORIES...
>
>         After adding VTK_LIBRARY_DIRS to the list of LINK_DIRECTORIES,
>         I get the
>         following link errors that I don't have with the version just
>         before
>         that commit:
>
>         CMakeFiles/itkvtkPolyDatatoBinaryMaskImageFilterTest.dir/itkvtkPolyDatatoBinaryMaskImageFilterTest.cxx.o:
>         In function `main':
>         /home/ajg23/GITROOT/GoFigure2/Examples/Filters/itkvtkPolyDatatoBinaryMaskImageFilterTest.cxx:79:
>         undefined reference to `vtkPolyDataAlgorithm::GetOutput()'
>         CMakeFiles/itkvtkPolyDatatoBinaryMaskImageFilterTest.dir/itkvtkPolyDatatoBinaryMaskImageFilterTest.cxx.o:
>         In function `vtkImageData::SetScalarTypeToUnsignedChar()':
>         /home/ajg23/GITROOT/VTK/Filtering/vtkImageData.h:290: undefined
>         reference to `vtkImageData::SetScalarType(int)'
>         CMakeFiles/itkvtkPolyDatatoBinaryMaskImageFilterTest.dir/itkvtkPolyDatatoBinaryMaskImageFilterTest.cxx.o:
>         In function `~vtkSmartPointer':
>         /home/ajg23/GITROOT/VTK/Common/vtkSmartPointer.h:27: undefined
>         reference
>         to `vtkSmartPointerBase::~vtkSmartPointerBase()'
>         /home/ajg23/GITROOT/VTK/Common/vtkSmartPointer.h:27: undefined
>         reference
>         to `vtkSmartPointerBase::~vtkSmartPointerBase()'
>         /home/ajg23/GITROOT/VTK/Common/vtkSmartPointer.h:27: undefined
>         reference
>         to `vtkSmartPointerBase::~vtkSmartPointerBase()'
>         /home/ajg23/GITROOT/VTK/Common/vtkSmartPointer.h:27: undefined
>         reference
>         to `vtkSmartPointerBase::~vtkSmartPointerBase()'
>         CMakeFiles/itkvtkPolyDatatoBinaryMaskImageFilterTest.dir/itkvtkPolyDatatoBinaryMaskImageFilterTest.cxx.o:
>         In function
>         `vtkSmartPointer<vtkImageData>::operator=(vtkSmartPointer<vtkImageData>
>         const&)':
>         /home/ajg23/GITROOT/VTK/Common/vtkSmartPointer.h:27: undefined
>         reference
>         to `vtkSmartPointerBase::operator=(vtkSmartPointerBase const&)'
>         CMakeFiles/itkvtkPolyDatatoBinaryMaskImageFilterTest.dir/itkvtkPolyDatatoBinaryMaskImageFilterTest.cxx.o:
>         In function
>         `vtkSmartPointer<vtkPolyDataToImageStencil>::operator=(vtkSmartPointer<vtkPolyDataToImageStencil>
>         const&)':
>         /home/ajg23/GITROOT/VTK/Common/vtkSmartPointer.h:27: undefined
>         reference
>         to `vtkSmartPointerBase::operator=(vtkSmartPointerBase const&)'
>         CMakeFiles/itkvtkPolyDatatoBinaryMaskImageFilterTest.dir/itkvtkPolyDatatoBinaryMaskImageFilterTest.cxx.o:
>         In function
>         `vtkSmartPointer<vtkImageStencil>::operator=(vtkSmartPointer<vtkImageStencil>
>         const&)':
>         /home/ajg23/GITROOT/VTK/Common/vtkSmartPointer.h:27: undefined
>         reference
>         to `vtkSmartPointerBase::operator=(vtkSmartPointerBase const&)'
>
>         ---
>
>         I am on Fedora 14 (64 bits), I use CMake version
>         2.8.3.20101209-gd2563...
>
>         Arnaud
>
>
>         On 12/14/2010 02:05 PM, David Cole wrote:
>
>             How did this break your application?
>
>             Can you send along the compile errors?
>
>
>
>             On Tue, Dec 14, 2010 at 2:00 PM, Arnaud GELAS
>             <arnaud_gelas at hms.harvard.edu
>             <mailto:arnaud_gelas at hms.harvard.edu>>   wrote:
>
>                 Hi all,
>
>                 With a recent commit introduced in VTK, I can't
>                 compile anymore my
>                 application.
>
>                 Here is the commit responsible of this change:
>
>                 d738ac139ca27a8113531841656b9e9a43ae55b5
>
>                 Is there a way to revert this commit?
>                 or to provide help/indications on how to make my
>                 application support this
>                 "new" version and previous one as well?
>
>                 Thanks in advance,
>                 Arnaud
>
>
>
>                 _______________________________________________
>                 Powered by www.kitware.com <http://www.kitware.com>
>
>                 Visit other Kitware open-source projects at
>                 http://www.kitware.com/opensource/opensource.html
>
>                 Follow this link to subscribe/unsubscribe:
>                 http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>         _______________________________________________
>         Powered by www.kitware.com <http://www.kitware.com>
>
>         Visit other Kitware open-source projects at
>         http://www.kitware.com/opensource/opensource.html
>
>         Follow this link to subscribe/unsubscribe:
>         http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>     _______________________________________________
>     Powered by www.kitware.com <http://www.kitware.com>
>
>     Visit other Kitware open-source projects at
>     http://www.kitware.com/opensource/opensource.html
>
>     Follow this link to subscribe/unsubscribe:
>     http://www.vtk.org/mailman/listinfo/vtk-developers
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20101214/64c17500/attachment.html>


More information about the vtk-developers mailing list