<DIV>hi all,</DIV>
<DIV>I&nbsp;met a problem when i&nbsp;bulit the "hello world" Registration ,and got the following<BR>errors. </DIV>
<DIV>The CMakeLists.txt i wrote is that</DIV>
<DIV>¡°</DIV>
<DIV># This is the root ITK CMakeLists file.<BR>CMAKE_MINIMUM_REQUIRED(VERSION 2.4)<BR>IF(COMMAND CMAKE_POLICY)<BR>&nbsp; CMAKE_POLICY(SET CMP0003 NEW)<BR>ENDIF(COMMAND CMAKE_POLICY)</DIV>
<DIV><BR># This project is designed to be built outside the Insight source tree.<BR>PROJECT(HelloWorldRegistration)</DIV>
<DIV># Find ITK.<BR>FIND_PACKAGE(ITK REQUIRED)<BR>INCLUDE(${ITK_USE_FILE})</DIV>
<DIV>ADD_EXECUTABLE(ImageRegistration1&nbsp; ImageRegistration1.cxx )</DIV>
<DIV>TARGET_LINK_LIBRARIES(ImageRegistration1 ITKCommon)</DIV>
<DIV>¡±<BR>I thank maybe is CMakeList.txt get something wrong. Please,help me. </DIV>
<DIV>лл</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>--------------------Configuration: ImageRegistration1 - Win32 Debug--------------------<BR>Compiling...<BR>ImageRegistration1.cxx<BR>Linking...<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::RegularStepGradientDescentOptimizer::StepAlongGradient(double,class itk::Array&lt;double&gt; const &amp;)" (<A href="mailto:?StepAlongGradient@RegularStepGradientDesce">?StepAlongGradient@RegularStepGradientDesce</A><BR><A href="mailto:ntOptimizer@itk@@MAEXNABV?$Array@N@2@@Z">ntOptimizer@itk@@MAEXNABV?$Array@N@2@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::RegularStepGradientDescentBaseOptimizer::AdvanceOneStep(void)" (<A href="mailto:?AdvanceOneStep@RegularStepGradientDescentBaseOptimizer@itk@@MAEXXZ">?AdvanceOneStep@RegularStepGradientDescentBaseOptimizer@itk@@MAEXXZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::SingleValuedNonLinearOptimizer::SetCostFunction(class itk::SingleValuedCostFunction *)" (<A href="mailto:?SetCostFunction@SingleValuedNonLinearOptimizer@itk@@UA">?SetCostFunction@SingleValuedNonLinearOptimizer@itk@@UA</A><BR><A href="mailto:EXPAVSingleValuedCostFunction@2@@Z">EXPAVSingleValuedCostFunction@2@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::Optimizer::SetCurrentPosition(class itk::Array&lt;double&gt; const &amp;)" (<A href="mailto:?SetCurrentPosition@Optimizer@itk@@MAEXABV?$Array@N@2@@Z">?SetCurrentPosition@Optimizer@itk@@MAEXABV?$Array@N@2@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const __thiscall itk::RegularStepGradientDescentBaseOptimizer::GetStopConditi<BR>onDescription(void)const " (<A href="mailto:?GetStopConditionDescription@RegularStepGradientDescentBaseOptimizer@itk@@UBE?BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ">?GetStopConditionDescription@RegularStepGradientDescentBaseOptimizer@itk@@UBE?BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::RegularStepGradientDescentBaseOptimizer::StartOptimization(void)" (<A href="mailto:?StartOptimization@RegularStepGradientDescentBaseOptimizer@itk@@UAEXXZ">?StartOptimization@RegularStepGradientDescentBaseOptimizer@itk@@UAEXXZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::Optimizer::SetInitialPosition(class itk::Array&lt;double&gt; const &amp;)" (<A href="mailto:?SetInitialPosition@Optimizer@itk@@UAEXABV?$Array@N@2@@Z">?SetInitialPosition@Optimizer@itk@@UAEXABV?$Array@N@2@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::RegularStepGradientDescentBaseOptimizer::PrintSelf(class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp;,class itk::Indent)const " <BR>(<A href="mailto:?PrintSelf@RegularStepGradientDescentBaseOptimizer@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z">?PrintSelf@RegularStepGradientDescentBaseOptimizer@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: __thiscall itk::RegularStepGradientDescentBaseOptimizer::RegularStepGradientDescentBaseOptimizer(void)" (<A href="mailto:??0RegularStepGradientDescentBaseOptimizer@itk@@IAE@XZ">??0RegularStepGradientDescentBaseOptimizer@itk@@IAE@XZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const __thiscall itk::Optimizer::GetStopConditionDescription(void)const " (?G<BR><A href="mailto:etStopConditionDescription@Optimizer@itk@@UBE?BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ">etStopConditionDescription@Optimizer@itk@@UBE?BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::SingleValuedNonLinearOptimizer::PrintSelf(class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp;,class itk::Indent)const " (?PrintSe<BR><A href="mailto:lf@SingleValuedNonLinearOptimizer@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z">lf@SingleValuedNonLinearOptimizer@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::Optimizer::PrintSelf(class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp;,class itk::Indent)const " (<A href="mailto:?PrintSelf@Optimizer@itk@@MBE">?PrintSelf@Optimizer@itk@@MBE</A><BR><A href="mailto:XAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z">XAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: __thiscall itk::Optimizer::Optimizer(void)" (<A href="mailto:??0Optimizer@itk@@IAE@XZ">??0Optimizer@itk@@IAE@XZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: __thiscall itk::SingleValuedNonLinearOptimizer::SingleValuedNonLinearOptimizer(void)" (<A href="mailto:??0SingleValuedNonLinearOptimizer@itk@@IAE@XZ">??0SingleValuedNonLinearOptimizer@itk@@IAE@XZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::CostFunction::PrintSelf(class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp;,class itk::Indent)const " (<A href="mailto:?PrintSelf@CostFunction@it">?PrintSelf@CostFunction@it</A><BR><A href="mailto:k@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z">k@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall itk::ImageIORegion::~ImageIORegion(void)" (<A href="mailto:??1ImageIORegion@itk@@UAE@XZ">??1ImageIORegion@itk@@UAE@XZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: __thiscall itk::ImageIORegion::ImageIORegion(void)" (<A href="mailto:??0ImageIORegion@itk@@QAE@XZ">??0ImageIORegion@itk@@QAE@XZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: static class itk::SmartPointer&lt;class itk::ImageIOBase&gt; __cdecl itk::ImageIOFactory::CreateImageIO(char const *,enum itk::ImageIOFactory::FileModeType)" (<A href="mailto:?CreateImageIO@Image">?CreateImageIO@Image</A><BR><A href="mailto:IOFactory@itk@@SA?AV?$SmartPointer@VImageIOBase@itk@@@2@PBDW4FileModeType@12@@Z">IOFactory@itk@@SA?AV?$SmartPointer@VImageIOBase@itk@@@2@PBDW4FileModeType@12@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp; __cdecl itk::operator&lt;&lt;(class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp;,class itk::ImageIORegion cons<BR>t &amp;)" (<A href="mailto:??6itk@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVImageIORegion@0@@Z">??6itk@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVImageIORegion@0@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: void __thiscall itk::ImageIORegion::operator=(class itk::ImageIORegion const &amp;)" (<A href="mailto:??4ImageIORegion@itk@@QAEXABV01@@Z">??4ImageIORegion@itk@@QAEXABV01@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: __thiscall itk::ImageIORegion::ImageIORegion(unsigned int)" (<A href="mailto:??0ImageIORegion@itk@@QAE@I@Z">??0ImageIORegion@itk@@QAE@I@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall itk::ImageIORegion::GetNumberOfPixels(void)const " (<A href="mailto:?GetNumberOfPixels@ImageIORegion@itk@@QBEIXZ">?GetNumberOfPixels@ImageIORegion@itk@@QBEIXZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: __thiscall itk::ImageIORegion::ImageIORegion(class itk::ImageIORegion const &amp;)" (<A href="mailto:??0ImageIORegion@itk@@QAE@ABV01@@Z">??0ImageIORegion@itk@@QAE@ABV01@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: bool __thiscall itk::ImageIORegion::IsInside(class itk::ImageIORegion const &amp;)const " (<A href="mailto:?IsInside@ImageIORegion@itk@@QBE_NABV12@@Z">?IsInside@ImageIORegion@itk@@QBE_NABV12@@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: void __thiscall itk::ImageIOBase::SetNumberOfDimensions(unsigned int)" (<A href="mailto:?SetNumberOfDimensions@ImageIOBase@itk@@QAEXI@Z">?SetNumberOfDimensions@ImageIOBase@itk@@QAEXI@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: void __thiscall itk::ImageIORegion::SetIndex(unsigned long,int)" (<A href="mailto:?SetIndex@ImageIORegion@itk@@QAEXKH@Z">?SetIndex@ImageIORegion@itk@@QAEXKH@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: void __thiscall itk::ImageIORegion::SetSize(unsigned long,unsigned int)" (<A href="mailto:?SetSize@ImageIORegion@itk@@QAEXKI@Z">?SetSize@ImageIORegion@itk@@QAEXKI@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall itk::ImageIORegion::GetImageDimension(void)const " (<A href="mailto:?GetImageDimension@ImageIORegion@itk@@QBEIXZ">?GetImageDimension@ImageIORegion@itk@@QBEIXZ</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: int __thiscall itk::ImageIORegion::GetIndex(unsigned long)const " (<A href="mailto:?GetIndex@ImageIORegion@itk@@QBEHK@Z">?GetIndex@ImageIORegion@itk@@QBEHK@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall itk::ImageIORegion::GetSize(unsigned long)const " (<A href="mailto:?GetSize@ImageIORegion@itk@@QBEIK@Z">?GetSize@ImageIORegion@itk@@QBEIK@Z</A>)<BR>ImageRegistration1.obj : error LNK2001: unresolved external symbol "public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __thiscall itk::ImageIOBase::GetComponentTypeAsString(enum itk::ImageIOBase::IOCompon<BR>entType)const " (<A href="mailto:?GetComponentTypeAsString@ImageIOBase@itk@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4IOComponentType@12@@Z">?GetComponentTypeAsString@ImageIOBase@itk@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4IOComponentType@12@@Z</A>)<BR>F:\MyProgram\ITK+VTK\ITK\hellowRegistration\Debug/ImageRegistration1.exe : fatal error LNK1120: 31 unresolved externals<BR>Error executing link.exe.</DIV>
<DIV>ALL_BUILD - 32 error(s), 0 warning(s)<BR><BR><BR></DIV>
<DIV><EM></EM>&nbsp;</DIV>