[vtkusers] undefined reference

Luke hazelnusse at gmail.com
Sun Apr 22 19:59:48 EDT 2012


In the latest commit of master
(fa1671ce2af1867db78079abbb44feb1309e3f36), when I build I am getting
an undefined reference:

...
Linking CXX executable ../../../../bin/vtkFiltersGeneralCxxTests
cd /home/luke/repos/VTK-build/Filters/General/Testing/Cxx &&
/usr/bin/cmake -E cmake_link_script
CMakeFiles/vtkFiltersGeneralCxxTests.dir/link.txt --verbose=1
/usr/bin/c++   -Wall  -g  -Wl,--fatal-warnings -Wl,--no-undefined -lc
-Wl,--fatal-warnings -Wl,--no-undefined -lc
CMakeFiles/vtkFiltersGeneralCxxTests.dir/CxxTests.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestGraphWeightEuclideanDistanceFilter.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/BoxClipPolyData.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/BoxClipTetrahedra.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/BoxClipTriangulate.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/BoxClipTriangulateAndInterpolate.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestBooleanOperationPolyDataFilter.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestBooleanOperationPolyDataFilter2.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestDensifyPolyData.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestDistancePolyDataFilter.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestGradientAndVorticity.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestIconGlyphFilterGravity.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestImageDataToPointSet.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestIntersectionPolyDataFilter.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestMultiBlock.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestQuadraturePoints.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestRectilinearGridToPointSet.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestReflectionFilter.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestUncertaintyTubeFilter.cxx.o
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestYoungsMaterialInterface.cxx.o
 -o ../../../../bin/vtkFiltersGeneralCxxTests -rdynamic
../../../../lib/libvtkFiltersGeneral-6.0.so.1
../../../../lib/libvtkCommonComputationalGeometry-6.0.so.1
../../../../lib/libvtkCommonDataModel-6.0.so.1
../../../../lib/libvtkCommonMath-6.0.so.1
../../../../lib/libvtkCommonCore-6.0.so.1
../../../../lib/libvtksys-6.0.so.1
../../../../lib/libvtkCommonMisc-6.0.so.1
../../../../lib/libvtkCommonSystem-6.0.so.1
../../../../lib/libvtkCommonTransforms-6.0.so.1
../../../../lib/libvtkFiltersCore-6.0.so.1
../../../../lib/libvtkCommonExecutionModel-6.0.so.1
../../../../lib/libvtkRenderingAnnotation-6.0.so.1
../../../../lib/libvtkImagingColor-6.0.so.1
../../../../lib/libvtkImagingCore-6.0.so.1
../../../../lib/libvtkRenderingFreeType-6.0.so.1
../../../../lib/libvtkRenderingCore-6.0.so.1
../../../../lib/libvtkFiltersExtraction-6.0.so.1
../../../../lib/libvtkFiltersGeometry-6.0.so.1
../../../../lib/libvtkFiltersSources-6.0.so.1
../../../../lib/libvtkIOImage-6.0.so.1
../../../../lib/libvtkDICOMParser-6.0.so.1
../../../../lib/libvtkIOGeometry-6.0.so.1
../../../../lib/libvtkIOCore-6.0.so.1
../../../../lib/libvtkzlib-6.0.so.1
../../../../lib/libvtkmetaio-6.0.so.1
../../../../lib/libvtkjpeg-6.0.so.1
../../../../lib/libvtkoggtheora-6.0.so.1
../../../../lib/libvtkpng-6.0.so.1 ../../../../lib/libvtktiff-6.0.so.1
../../../../lib/libvtkIOXML-6.0.so.1
../../../../lib/libvtkexpat-6.0.so.1
../../../../lib/libvtkfreetype-6.0.so.1
../../../../lib/libvtkftgl-6.0.so.1
../../../../lib/libvtkRenderingFreeTypeOpenGL-6.0.so.1
../../../../lib/libvtkRenderingOpenGL-6.0.so.1
../../../../lib/libvtkImagingHybrid-6.0.so.1
../../../../lib/libvtkTestingRendering-6.0.so.1
../../../../lib/libvtkRenderingFreeType-6.0.so.1
../../../../lib/libvtkftgl-6.0.so.1
../../../../lib/libvtkfreetype-6.0.so.1 -lGLU -lGL -lSM -lICE -lX11
-lXext -Wl,-Bstatic -lXNVCtrl -Wl,-Bdynamic -lSM -lICE -lX11 -lXext
-Wl,-Bstatic -lXNVCtrl -Wl,-Bdynamic -lXt
../../../../lib/libvtkImagingCore-6.0.so.1
../../../../lib/libvtkRenderingCore-6.0.so.1
../../../../lib/libvtkFiltersExtraction-6.0.so.1
../../../../lib/libvtkFiltersGeometry-6.0.so.1
../../../../lib/libvtkFiltersSources-6.0.so.1
../../../../lib/libvtkFiltersGeneral-6.0.so.1
../../../../lib/libvtkFiltersCore-6.0.so.1
../../../../lib/libvtkCommonComputationalGeometry-6.0.so.1
../../../../lib/libvtkIOImage-6.0.so.1
../../../../lib/libvtkDICOMParser-6.0.so.1
../../../../lib/libvtkmetaio-6.0.so.1
../../../../lib/libvtkoggtheora-6.0.so.1
../../../../lib/libvtkpng-6.0.so.1 ../../../../lib/libvtktiff-6.0.so.1
../../../../lib/libvtkjpeg-6.0.so.1 -lm
../../../../lib/libvtkIOXML-6.0.so.1
../../../../lib/libvtkIOGeometry-6.0.so.1
../../../../lib/libvtkIOCore-6.0.so.1
../../../../lib/libvtkCommonExecutionModel-6.0.so.1
../../../../lib/libvtkCommonDataModel-6.0.so.1
../../../../lib/libvtkCommonMisc-6.0.so.1
../../../../lib/libvtkCommonSystem-6.0.so.1
../../../../lib/libvtkCommonTransforms-6.0.so.1
../../../../lib/libvtkCommonMath-6.0.so.1
../../../../lib/libvtkCommonCore-6.0.so.1
../../../../lib/libvtksys-6.0.so.1 -ldl
../../../../lib/libvtkzlib-6.0.so.1
../../../../lib/libvtkexpat-6.0.so.1
-Wl,-rpath,/home/luke/repos/VTK-build/lib
CMakeFiles/vtkFiltersGeneralCxxTests.dir/TestMultiBlock.cxx.o: In
function `TestMultiBlock(int, char**)':
/home/luke/repos/VTK/Filters/General/Testing/Cxx/TestMultiBlock.cxx:91:
undefined reference to `vtkOutlineCornerFilter::New()'
collect2: ld returned 1 exit status
make[2]: *** [bin/vtkFiltersGeneralCxxTests] Error 1
make[2]: Leaving directory `/home/luke/repos/VTK-build'
make[1]: *** [Filters/General/Testing/Cxx/CMakeFiles/vtkFiltersGeneralCxxTests.dir/all]
Error 2
make[1]: Leaving directory `/home/luke/repos/VTK-build'
make: *** [all] Error 2

Is anybody else having this problem?  I looked at the CMakeLists.txt
file in that directory, but nothing struck me as obviously wrong.  My
guess is that some how the target_link_libraries command isn't
properly being used for the tests in that directory, but I don't know
for sure because I'm not very familiar with the testing aspects of
CMake.  For reference, 5.10-rc2 builds without this error (it seems
this example doesn't exist in the 5.10rc2 tag, or at least not in the
same directory).

Luke



More information about the vtkusers mailing list