[Insight-users] problem in running the examples

Luis Ibanez luis.ibanez at kitware.com
Mon Oct 15 09:57:15 EDT 2007


Hi Giorgos,


   You are missing to link to the ITKNumerics library.


   That's the library that contains the ITK Optimizers.



Please post to the mailing list the CMakeLists.txt file
that you wrote for the Registration examples.

    If you didn't write any CMakeLists.txt file,
    then...
               That's the problem   :-)


In that case, please refer to this recent email in the
Archives for details on how to do so:

http://public.kitware.com/pipermail/insight-users/2007-October/023866.html



BTW: When you install ITK, the ITK.sln file is not
      supposed to be copied to the installation directory,
      so that's not the reason why you are having linking
      problems.



   Regards,


       Luis


---------------------
Giorgos Pichis wrote:
> Hi there,
> 
> I have installed the itk toolkit, runned succesfully the helloworld example,
> but I have problems in running the registration examples.
> Errors appear in the compiler (Microsoft Visual C++  6).
> I have copied below the output window of the debugging process
> 
> 
>       Output Window
> 
> Compiling... ImageRegistration13.cxx Linking... Creating library 
> Debug/ImageRegistration13.lib and object Debug/ImageRegistration13.exp 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "public: void __thiscall itk::Optimizer::SetScales(class itk::Array 
> const &)" (?SetScales at Optimizer@itk@@QAEXABV?$Array at N@2@@Z) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "protected: virtual void __thiscall 
> itk::RegularStepGradientDescentOptimizer::StepAlongGradient(double,class 
> itk::Array const &)" (?StepAlongGradient@ 
> RegularStepGradientDescentOptimizer at itk@@MAEXNABV?$Array at N@2@@Z) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "protected: virtual void __thiscall 
> itk::RegularStepGradientDescentBaseOptimizer::AdvanceOneStep(void)" 
> (?AdvanceOneStep at RegularStepGradientDescentBaseOptimizer@itk @@MAEXXZ) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "public: virtual void __thiscall 
> itk::SingleValuedNonLinearOptimizer::SetCostFunction(class 
> itk::SingleValuedCostFunction *)" (?SetCostFunction@ 
> SingleValuedNonLinearOptimizer at itk@@UAEXPAVSingleValuedCostFunction at 2@@Z) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "protected: virtual void __thiscall 
> itk::Optimizer::SetCurrentPosition(class itk::Array const &)" 
> (?SetCurrentPosition at Optimizer@itk@@MAEXABV?$Array at N @2@@Z) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "public: virtual void __thiscall 
> itk::RegularStepGradientDescentBaseOptimizer::StartOptimization(void)" 
> (?StartOptimization at RegularStepGradientDescentBaseOptimizer@itk 
> @@UAEXXZ) ImageRegistration13.obj : error LNK2001: unresolved external 
> symbol "public: virtual void __thiscall 
> itk::Optimizer::SetInitialPosition(class itk::Array const &)" 
> (?SetInitialPosition at Optimizer@itk@@UAEXABV?$Array at N @2@@Z) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "protected: virtual void __thiscall 
> itk::RegularStepGradientDescentBaseOptimizer::PrintSelf(class 
> std::basic_ostream > &,class itk::Indent)const " (?PrintSelf@ 
> RegularStepGradientDescentBaseOptimizer at itk@@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "protected: __thiscall 
> itk::RegularStepGradientDescentBaseOptimizer::RegularStepGradientDescentBaseOptimizer(void)" 
> (??0RegularStepGradientDescentBaseOptimizer at itk@@ IAE at XZ) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "protected: virtual void __thiscall 
> itk::SingleValuedNonLinearOptimizer::PrintSelf(class std::basic_ostream 
>  > &,class itk::Indent)const " (?PrintSelf@ 
> SingleValuedNonLinearOptimizer at itk@@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "protected: virtual void __thiscall itk::Optimizer::PrintSelf(class 
> std::basic_ostream > &,class itk::Indent)const " 
> (?PrintSelf at Optimizer@itk 
> @@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z) 
> ImageRegistration13.obj : error LNK2001: unresolved external symbol 
> "protected: __thiscall itk::Optimizer::Optimizer(void)" 
> (??0Optimizer at itk@@IAE at XZ) ImageRegistration13.obj : error LNK2001: 
> unresolved external symbol "protected: __thiscall 
> itk::SingleValuedNonLinearOptimizer::SingleValuedNonLinearOptimizer(void)" 
> (??0SingleValuedNonLinearOptimizer at itk@@IAE at XZ ) ImageRegistration13.obj 
> : error LNK2001: unresolved external symbol "protected: virtual void 
> __thiscall itk::CostFunction::PrintSelf(class std::basic_ostream > 
> &,class itk::Indent)const " (?PrintSelf at CostFunction@itk 
> @@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z) 
> Debug/ImageRegistration13.exe : fatal error LNK1120: 14 unresolved 
> externals Error executing link.exe.
> 
> 
> 
> PS. I couldn't find the Itk.sln file in the binary directory when I 
> installed Itk. Coult it be the problem
> I have CMake2.4 and InsightToolkit-3.4.0
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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