[Insight-users] Linker Problem with ImageRegistration6

Clemens M. Hentschke cmh at isg.cs.uni-magdeburg.de
Fri May 8 03:39:16 EDT 2009


Just solved the problem:
figured out that the problem was in CenteredTransformInitializer and had 
something to do with the included library vxl. So I compiled a newer 
version of the library by myself and set the USE_SYSTEM_VXL to ON and 
compiled ITK again. The linker problems disappeared and the 
ImageRegistration6 example with the provided CMakeList.txt worked!

Bill Lorensen schrieb:
> How are you building the example? Are you using your own CMakeLists.txt?
>
> On Thu, May 7, 2009 at 4:55 AM, Clemens M. Hentschke
> <cmh at isg.cs.uni-magdeburg.de> wrote:
>   
>> Hi All,
>>
>> I tried to compile ImageRegistration6 from the Registration examples
>> directory. Compiling went fine, but there occured a linker problem (see
>> below). I figured out that is has something to do with the classes
>> CenteredTransformInitializer or CenteredRigid2DTransform since I also tried
>> some of the previous registration examples and they worked.
>> I am using ITK 3.10, WinXP SP3, and as compiling system MINGW 5.1.4 with gcc
>> 3.4.2 and MSYS 1.0.10.
>>
>> Any help would be great! Thanks,
>>
>>  -Clemens
>>
>> ----------
>>
>> Linking CXX executable Registration.exe
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZN10vnl_matrixIdEC2Ejj[vnl_matrix<double>::vnl_matrix(unsigned
>> int, unsigned int)]+0x0):vnl_matrix+double-.cxx: multiple definition of
>> `vnl_matrix<double>::vnl_matrix(unsigned int, unsigned int)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000234.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZN10vnl_matrixIdEC1Ejj[vnl_matrix<double>::vnl_matrix(unsigned
>> int, unsigned int)]+0x0):vnl_matrix+double-.cxx: multiple definition of
>> `vnl_matrix<double>::vnl_matrix(unsigned int, unsigned int)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000219.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZN10vnl_matrixIdEC1ERKS0_[vnl_matrix<double>::vnl_matrix(vnl_matrix<double>
>> const&)]+0x0):vnl_matrix+double-.cxx: multiple definition of
>> `vnl_matrix<double>::vnl_matrix(vnl_matrix<double> const&)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000210.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZN10vnl_matrixIdEC1ERKS0_S2_11vnl_tag_mul[vnl_matrix<double>::vnl_matrix(vnl_matrix<double>
>> const&, vnl_matrix<double> const&,
>> vnl_tag_mul)]+0x0):vnl_matrix+double-.cxx: multiple definition of
>> `vnl_matrix<double>::vnl_matrix(vnl_matrix<double> const&,
>> vnl_matrix<double> const&, vnl_tag_mul)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000212.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZN10vnl_matrixIdE4fillERKd[vnl_matrix<double>::fill(double
>> const&)]+0x0):vnl_matrix+double-.cxx: multiple definition of
>> `vnl_matrix<double>::fill(double const&)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000193.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZN10vnl_matrixIdED1Ev[vnl_matrix<double>::~vnl_matrix()]+0x0):vnl_matrix+double-.cxx:
>> multiple definition of `vnl_matrix<double>::~vnl_matrix()'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000239.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZNK10vnl_matrixIdE9transposeEv[vnl_matrix<double>::transpose()
>> const]+0x0):vnl_matrix+double-.cxx: multiple definition of
>> `vnl_matrix<double>::transpose() const'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d004556.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZN10vnl_matrixIdED2Ev[vnl_matrix<double>::~vnl_matrix()]+0x0):vnl_matrix+double-.cxx:
>> multiple definition of `vnl_matrix<double>::~vnl_matrix()'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000240.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_matrix+double-.obj)(.text$_ZN10vnl_matrixIdEaSERKS0_[vnl_matrix<double>::operator=(vnl_matrix<double>
>> const&)]+0x0):vnl_matrix+double-.cxx: multiple definition of
>> `vnl_matrix<double>::operator=(vnl_matrix<double> const&)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000241.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdEC2Ej[vnl_vector<double>::vnl_vector(unsigned
>> int)]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::vnl_vector(unsigned int)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000526.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdEC1Ej[vnl_vector<double>::vnl_vector(unsigned
>> int)]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::vnl_vector(unsigned int)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000511.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdEC2ERKS0_[vnl_vector<double>::vnl_vector(vnl_vector<double>
>> const&)]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::vnl_vector(vnl_vector<double> const&)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000517.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdEC1ERKS0_[vnl_vector<double>::vnl_vector(vnl_vector<double>
>> const&)]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::vnl_vector(vnl_vector<double> const&)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000502.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdEC1ERK10vnl_matrixIdERKS0_11vnl_tag_mul[vnl_vector<double>::vnl_vector(vnl_matrix<double>
>> const&, vnl_vector<double> const&,
>> vnl_tag_mul)]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::vnl_vector(vnl_matrix<double> const&,
>> vnl_vector<double> const&, vnl_tag_mul)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000501.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdE4fillERKd[vnl_vector<double>::fill(double
>> const&)]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::fill(double const&)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000488.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdED1Ev[vnl_vector<double>::~vnl_vector()]+0x0):vnl_vector+double-.cxx:
>> multiple definition of `vnl_vector<double>::~vnl_vector()'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000530.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdED2Ev[vnl_vector<double>::~vnl_vector()]+0x0):vnl_vector+double-.cxx:
>> multiple definition of `vnl_vector<double>::~vnl_vector()'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000531.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdEaSERKS0_[vnl_vector<double>::operator=(vnl_vector<double>
>> const&)]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::operator=(vnl_vector<double> const&)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000532.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZNK10vnl_vectorIdE11operator_eqERKS0_[vnl_vector<double>::operator_eq(vnl_vector<double>
>> const&) const]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::operator_eq(vnl_vector<double> const&) const'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d004745.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+double-.obj)(.text$_ZN10vnl_vectorIdE8set_sizeEj[vnl_vector<double>::set_size(unsigned
>> int)]+0x0):vnl_vector+double-.cxx: multiple definition of
>> `vnl_vector<double>::set_size(unsigned int)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000498.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+float-.obj)(.text$_ZN10vnl_vectorIfEC2Ej[vnl_vector<float>::vnl_vector(unsigned
>> int)]+0x0):vnl_vector+float-.cxx: multiple definition of
>> `vnl_vector<float>::vnl_vector(unsigned int)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000589.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+float-.obj)(.text$_ZN10vnl_vectorIfED2Ev[vnl_vector<float>::~vnl_vector()]+0x0):vnl_vector+float-.cxx:
>> multiple definition of `vnl_vector<float>::~vnl_vector()'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000594.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+float-.obj)(.text$_ZN10vnl_vectorIfEaSERKS0_[vnl_vector<float>::operator=(vnl_vector<float>
>> const&)]+0x0):vnl_vector+float-.cxx: multiple definition of
>> `vnl_vector<float>::operator=(vnl_vector<float> const&)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000595.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_vector+float-.obj)(.text$_ZN10vnl_vectorIfE8set_sizeEj[vnl_vector<float>::set_size(unsigned
>> int)]+0x0):vnl_vector+float-.cxx: multiple definition of
>> `vnl_vector<float>::set_size(unsigned int)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000561.o)(.text+0x0): first defined here
>> d:/ITK-bin/bin/libitkvnl.a(vnl_c_vector+double-.obj)(.text$_ZN12vnl_c_vectorIdE13allocate_TptrEi[vnl_c_vector<double>::allocate_Tptr(int)]+0x0):vnl_c_vector+double-.cxx:
>> multiple definition of `vnl_c_vector<double>::allocate_Tptr(int)'
>> d:/ITK-bin/bin/libITKCommon.dll.a(d000736.o)(.text+0x0): first defined here
>> Creating library file: libRegistration.dll.a
>> collect2: ld returned 1 exit status
>> make[2]: *** [Registration.exe] Error 1
>> make[1]: *** [CMakeFiles/Registration.dir/all] Error 2
>> make: *** [all] Error 2
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>     
>
>   


More information about the Insight-users mailing list