[Insight-users] Help with ITK 2.4.1 and cmake 2.2.3.

Karthik Krishnan Karthik.Krishnan at kitware.com
Tue Feb 14 10:59:14 EST 2006


1. Please wipe the entire binary directory before rebuilding since you 
upgraded cmake.

2. The linker errors are related to the fact that between ITK2 and 2.4 
the ITKStatistics libarary was introduced, so if you use the statistics 
framework (MI registration certainly will), you must link against 
ITKStatistics too like this:
http://www.itk.org/cgi-bin/viewcvs.cgi/Examples/Registration/CMakeLists.txt?root=Insight&r1=1.100&r2=1.101

HTH
-karthik

George Iordanescu wrote:

>Hi, 
>
>I am reposting this question, maybe somebody can help me.
>
>I updated my ITK libraries (from 2.00 to 2.4.1) and Cmake (from 1.8.3 to
>2.2.3) and I have these errors when building my apps that I was able to
>build previously without problems.
>
>Any help will be HIGHLY appresiated.
>
>Thank you.
>
>George
>
>[giordanescu at hp6000 buildtest]$ ccmake ../../
>
>
>[giordanescu at hp6000 buildtest]$ make
>Scanning dependencies of target CmrRegistration
>Building CXX object
>Auxiliary/Registration/CMakeFiles/CmrRegistration.dir/CmrRegistration.o
>Building CXX object
>Auxiliary/Registration/CMakeFiles/CmrRegistration.dir/FemRegistrator.o
>Building CXX object
>Auxiliary/Registration/CMakeFiles/CmrRegistration.dir/FemParametersFileGenerator.o
>/home/giordanescu/cmr/apps/ITKApp/Auxiliary/Registration/FemParametersFileGenerator.cxx:51:24: warning: multi-line string literals are deprecated
>Linking CXX static library libCmrRegistration.a
>Generating fltkClippingPlane3DDrawerGUI.cxx
>Generating fltkDisplayGlWindowGUI.cxx
>Generating fltkDisplayGlWindowFlatGUI.cxx
>Generating fltkFrustumFunctionControlGUI.cxx
>Generating fltkImageViewerGUI.cxx
>Generating fltkImage2DViewerGUI.cxx
>Generating fltkRGBImage2DViewerGUI.cxx
>Generating fltkRegularStepGradientDescentGUI.cxx
>Generating fltkSlice2DDrawerGUI.cxx
>Generating fltkSlice3DDrawerGUI.cxx
>Generating fltkSphereFunctionControlGUI.cxx
>Generating fltkTimeProbesCollectorGUI.cxx
>Scanning dependencies of target ITKFltkImageViewer
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkBox3D.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkCone3D.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkClippingPlane3DDrawer.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkCylinder3D.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkFrustum3D.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkGlWindow.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkGlWindowInteractive.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkGlWindowInteractiveFlat.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkImage2DViewerWindow.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkRGBImage2DViewerWindow.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkLightButton.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkProgressBar.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkShape3D.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkSphere3D.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkWindowInteractive.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkTimeProbeGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkTimeProbesCollector.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkUtils.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkClippingPlane3DDrawerGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkDisplayGlWindowGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkDisplayGlWindowFlatGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkFrustumFunctionControlGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkImageViewerGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkImage2DViewerGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkRGBImage2DViewerGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkRegularStepGradientDescentGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkSlice2DDrawerGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkSlice3DDrawerGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkSphereFunctionControlGUI.o
>Building CXX object
>Auxiliary/FltkImageViewer/CMakeFiles/ITKFltkImageViewer.dir/fltkTimeProbesCollectorGUI.o
>Linking CXX static library libITKFltkImageViewer.a
>Scanning dependencies of target Logger
>Building CXX object Auxiliary/Logger/CMakeFiles/Logger.dir/Exception.o
>Building CXX object Auxiliary/Logger/CMakeFiles/Logger.dir/LogMsg.o
>Linking CXX static library libLogger.a
>Scanning dependencies of target FMRI
>Building CXX object
>Auxiliary/FMRI/CMakeFiles/FMRI.dir/ActivationMapComputer.o
>Building CXX object
>Auxiliary/FMRI/CMakeFiles/FMRI.dir/MRIDataSimulator.o
>Linking CXX static library libFMRI.a
>Scanning dependencies of target DataManagement
>Building CXX object
>Auxiliary/DataManagement/CMakeFiles/DataManagement.dir/DataManager.o
>Building CXX object
>Auxiliary/DataManagement/CMakeFiles/DataManagement.dir/MetaHeaderCreator.o
>Building CXX object
>Auxiliary/DataManagement/CMakeFiles/DataManagement.dir/complexFieldReader.o
>Building CXX object
>Auxiliary/DataManagement/CMakeFiles/DataManagement.dir/fieldReader.o
>Linking CXX static library libDataManagement.a
>Generating guiMain.cxx
>Scanning dependencies of target
>LandmarkInitializedMutualInformationRegistration
>Building CXX object
>LandmarkInitializedMutualInformationRegistration/CMakeFiles/LandmarkInitializedMutualInformationRegistration.dir/guiMainImplementation.o
>/home/giordanescu/cmr/apps/ITKApp/LandmarkInitializedMutualInformationRegistration/guiMainImplementation.cxx: In
>   member function `void
>guiMainImplementation::Register_PerVolume(int)':
>/home/giordanescu/cmr/apps/ITKApp/LandmarkInitializedMutualInformationRegistration/guiMainImplementation.cxx:1713: warning: decimal
>   constant is so large that it is unsigned
>Building CXX object
>LandmarkInitializedMutualInformationRegistration/CMakeFiles/LandmarkInitializedMutualInformationRegistration.dir/LandmarkRegistrator.o
>Building CXX object
>LandmarkInitializedMutualInformationRegistration/CMakeFiles/LandmarkInitializedMutualInformationRegistration.dir/main.o
>Building CXX object
>LandmarkInitializedMutualInformationRegistration/CMakeFiles/LandmarkInitializedMutualInformationRegistration.dir/CommandIterationUpdate.o
>Building CXX object
>LandmarkInitializedMutualInformationRegistration/CMakeFiles/LandmarkInitializedMutualInformationRegistration.dir/guiMain.o
>Linking CXX executable LandmarkInitializedMutualInformationRegistration
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/DataManagement/libDataManagement.a(DataManager.o)(.gnu.linkonce.t._ZN3itk10Statistics23DenseFrequencyContainer3NewEv+0x7f): In function `itk::Statistics::DenseFrequencyContainer::New()':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::DenseFrequencyContainer()'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/DataManagement/libDataManagement.a(DataManager.o)(.gnu.linkonce.t._ZNK3itk10Statistics9HistogramIdLj2ENS0_23DenseFrequencyContainerEE12GetFrequencyERKm+0x1f): In function `itk::Statistics::Histogram<double, 2u, itk::Statistics::DenseFrequencyContainer>::GetFrequency(unsigned long const&) const':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::GetFrequency(unsigned long)
>const'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/DataManagement/libDataManagement.a(DataManager.o)(.gnu.linkonce.t._ZN3itk10Statistics9HistogramIdLj2ENS0_23DenseFrequencyContainerEE10InitializeERKNS_4SizeILj2EEE+0x14d): In function `itk::Statistics::Histogram<double, 2u, itk::Statistics::DenseFrequencyContainer>::Initialize(itk::Size<2u> const&)':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::Initialize(unsigned long)'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/DataManagement/libDataManagement.a(DataManager.o)(.gnu.linkonce.t._ZN3itk10Statistics9HistogramIdLj2ENS0_23DenseFrequencyContainerEE17IncreaseFrequencyERKmf+0x22): In function `itk::Statistics::Histogram<double, 2u, itk::Statistics::DenseFrequencyContainer>::IncreaseFrequency(unsigned long const&, float)':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::IncreaseFrequency(unsigned
>long, float)'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/DataManagement/libDataManagement.a(DataManager.o)(.gnu.linkonce.t._ZN3itk10Statistics9HistogramIdLj2ENS0_23DenseFrequencyContainerEE12SetFrequencyERKmf+0x22): In function `itk::Statistics::Histogram<double, 2u, itk::Statistics::DenseFrequencyContainer>::SetFrequency(unsigned long const&, float)':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::SetFrequency(unsigned long,
>float)'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/DataManagement/libDataManagement.a(DataManager.o)(.gnu.linkonce.t._ZN3itk10Statistics9HistogramIdLj2ENS0_23DenseFrequencyContainerEE9SetToZeroEv+0x1a): In function `itk::Statistics::Histogram<double, 2u, itk::Statistics::DenseFrequencyContainer>::SetToZero()':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::SetToZero()'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/DataManagement/libDataManagement.a(DataManager.o)(.gnu.linkonce.t._ZN3itk13ObjectFactoryINS_10Statistics23DenseFrequencyContainerEE6CreateEv+0x11): In function `itk::ObjectFactory<itk::Statistics::DenseFrequencyContainer>::Create()':
>: undefined reference to `typeinfo for
>itk::Statistics::DenseFrequencyContainer'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/DataManagement/libDataManagement.a(DataManager.o)(.gnu.linkonce.t._ZN3itk13ObjectFactoryINS_10Statistics23DenseFrequencyContainerEE6CreateEv+0x51): In function `itk::ObjectFactory<itk::Statistics::DenseFrequencyContainer>::Create()':
>: undefined reference to `typeinfo for
>itk::Statistics::DenseFrequencyContainer'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/Registration/libCmrRegistration.a(CmrRegistration.o)(.gnu.linkonce.t._ZNK3itk10Statistics9HistogramIfLj1ENS0_23DenseFrequencyContainerEE12GetFrequencyERKm+0x1f): In function `itk::Statistics::Histogram<float, 1u, itk::Statistics::DenseFrequencyContainer>::GetFrequency(unsigned long const&) const':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::GetFrequency(unsigned long)
>const'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/Registration/libCmrRegistration.a(CmrRegistration.o)(.gnu.linkonce.t._ZN3itk10Statistics9HistogramIfLj1ENS0_23DenseFrequencyContainerEE10InitializeERKNS_4SizeILj1EEE+0x147): In function `itk::Statistics::Histogram<float, 1u, itk::Statistics::DenseFrequencyContainer>::Initialize(itk::Size<1u> const&)':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::Initialize(unsigned long)'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/Registration/libCmrRegistration.a(CmrRegistration.o)(.gnu.linkonce.t._ZN3itk10Statistics9HistogramIfLj1ENS0_23DenseFrequencyContainerEE9SetToZeroEv+0x1a): In function `itk::Statistics::Histogram<float, 1u, itk::Statistics::DenseFrequencyContainer>::SetToZero()':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::SetToZero()'
>/home/giordanescu/cmr/apps/ITKApp/builds/buildtest/Auxiliary/Registration/libCmrRegistration.a(CmrRegistration.o)(.gnu.linkonce.t._ZN3itk10Statistics9HistogramIfLj1ENS0_23DenseFrequencyContainerEE17IncreaseFrequencyERKmf+0x22): In function `itk::Statistics::Histogram<float, 1u, itk::Statistics::DenseFrequencyContainer>::IncreaseFrequency(unsigned long const&, float)':
>: undefined reference to
>`itk::Statistics::DenseFrequencyContainer::IncreaseFrequency(unsigned
>long, float)'
>collect2: ld returned 1 exit status
>make[2]: ***
>[LandmarkInitializedMutualInformationRegistration/LandmarkInitializedMutualInformationRegistration] Error 1
>make[1]: ***
>[LandmarkInitializedMutualInformationRegistration/CMakeFiles/LandmarkInitializedMutualInformationRegistration.dir/all] Error 2
>make: *** [all] Error 2
>[giordanescu at hp6000 buildtest]$
>
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>
>  
>


More information about the Insight-users mailing list