[Insight-users] Linking problem [optimizer?]

J Mst gave_edgar at hotmail . com
Wed, 07 May 2003 14:32:24 +0000


Thanks for your reply Paul,

You were right, it was the itkNumerics.lib which I forgot to include in my 
Cmakelists.txt file.



>From: Paul Yushkevich <pauly@cognitica.com>
>To: J Mst <gave_edgar@hotmail.com>
>CC: insight-users@public.kitware.com
>Subject: Re: [Insight-users] Linking problem [optimizer?]
>Date: Tue, 06 May 2003 09:44:46 -0400
>
>Joris,
>
>It looks that all the missing symbols are from the ITK Numerics library.  
>Perhaps the file itkNumerics.lib is not being included in your build.  I 
>would check the linker page in the VC++ project settings, and see if that 
>library is being liked with.  If not, you need to add it to the list of 
>libraries in your CMakeLists.txt file.
>
>Paul.
>
>J Mst wrote:
>
>>Hi all,
>>
>>I was making a little programming which can do registration. I use an MFC 
>>interface. The compiling process is going ok but when VC++ start linking I 
>>get the following error message:
>>
>>*********************************************************************
>>Compiling...
>>mattesDialog.cpp
>>mattesDialogDlg.cpp
>>Generating Code...
>>Linking...
>>   Creating library Debug/CmakeMattes.lib and object Debug/CmakeMattes.exp
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol 
>>"protected: virtual void __thiscall 
>>itk::RegularStepGradientDescentOptimizer::StepAlongGradient(double,class 
>>itk::Array<double> const &)" 
>>(?StepAlongGradient@RegularStepGradientDescentOptimizer@itk@@MAEXNABV?$Array@N@2@@Z)
>>
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol 
>>"protected: virtual void __thiscall 
>>itk::RegularStepGradientDescentBaseOptimizer::AdvanceOneStep(void)" 
>>(?AdvanceOneStep@RegularStepGradientDescentBaseOptimizer@itk@@MAEXXZ)
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol "public: 
>>virtual void __thiscall 
>>itk::SingleValuedNonLinearOptimizer::SetCostFunction(class 
>>itk::SingleValuedCostFunction *)" 
>>(?SetCostFunction@SingleValuedNonLinearOptimizer@itk@@UAEXPAVSingleValuedCostFunction@2@@Z)
>>
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol 
>>"protected: virtual void __thiscall 
>>itk::Optimizer::SetCurrentPosition(class itk::Array<double> const &)" 
>>(?SetCurrentPosition@Optimizer@itk@@MAEXABV?$Array@N@2@@Z)
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol "public: 
>>virtual void __thiscall 
>>itk::RegularStepGradientDescentBaseOptimizer::StartOptimization(void)" 
>>(?StartOptimization@RegularStepGradientDescentBaseOptimizer@itk@@UAEXXZ)
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol "public: 
>>virtual void __thiscall itk::Optimizer::SetInitialPosition(class 
>>itk::Array<double> const &)" 
>>(?SetInitialPosition@Optimizer@itk@@UAEXABV?$Array@N@2@@Z)
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol 
>>"protected: virtual void __thiscall 
>>itk::RegularStepGradientDescentBaseOptimizer::PrintSelf(class 
>>std::basic_ostream<char,struct std::char_traits<char> > &,class 
>>itk::Indent)const " 
>>(?PrintSelf@RegularStepGradientDescentBaseOptimizer@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z)
>>
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol 
>>"protected: __thiscall 
>>itk::RegularStepGradientDescentBaseOptimizer::RegularStepGradientDescentBaseOptimizer(void)" 
>>(??0RegularStepGradientDescentBaseOptimizer@itk@@IAE@XZ)
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol 
>>"protected: virtual void __thiscall 
>>itk::SingleValuedNonLinearOptimizer::PrintSelf(class 
>>std::basic_ostream<char,struct std::char_traits<char> > &,class 
>>itk::Indent)const " 
>>(?PrintSelf@SingleValuedNonLinearOptimizer@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z)
>>
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol 
>>"protected: virtual void __thiscall itk::Optimizer::PrintSelf(class 
>>std::basic_ostream<char,struct std::char_traits<char> > &,class 
>>itk::Indent)const " 
>>(?PrintSelf@Optimizer@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z)
>>
>>mattesDialogDlg.obj : error LNK2001: unresolved external symbol 
>>"protected: virtual void __thiscall itk::CostFunction::PrintSelf(class 
>>std::basic_ostream<char,struct std::char_traits<char> > &,class 
>>itk::Indent)const " 
>>(?PrintSelf@CostFunction@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z)
>>
>>Debug/CmakeMattes.exe : fatal error LNK1120: 11 unresolved externals
>>Error executing link.exe.
>>
>>**********************************************************************
>>
>>I have tried many different ways to "call" the optimizer.. but without 
>>success. Does anyone know how to correct my problem??
>>
>>Many thanx in advance
>>
>>Joris
>>
>>
>>
>>
>>
>>_________________________________________________________________
>>MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
>>
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users@public.kitware.com
>>http://public.kitware.com/mailman/listinfo/insight-users
>>
>>
>
>
>--
>--------------------------------
>Paul A. Yushkevich, Ph.D.
>President, Cognitica Corporation
>
>17 Flemington Rd
>Chapel Hill, NC 27517
>Tel: 1-919-929-7652
>--------------------------------
>
>

_________________________________________________________________
Chatten met je online vrienden via MSN Messenger. http://messenger.msn.nl/