<div dir="ltr"><div>Dear all,</div>
<div>&nbsp;</div>
<div>If using the below CMakeLists.txt (copy from InsightApplication\Auxiliary\vtk)</div>
<div>=======================================================================</div>
<div># This project is designed to be built outside the Insight source tree.<br>PROJECT(myProject)</div>
<div># Find ITK.<br>FIND_PACKAGE(ITK REQUIRED)<br>IF(ITK_FOUND)<br>&nbsp; INCLUDE(${ITK_USE_FILE})<br>ENDIF(ITK_FOUND)</div>
<div>FIND_PACKAGE (VTK)<br>IF ( VTK_FOUND)<br>&nbsp; INCLUDE( ${USE_VTK_FILE} )<br>ENDIF( VTK_FOUND)</div>
<div>&nbsp;</div>
<div>ADD_LIBRARY(ITKVTKIntegration vtkRegistrationMonitor.cxx vtkKWImage.cxx vtkKWImageIO.cxx)<br>ADD_EXECUTABLE(itkRegisterITKMonitorVTK itkRegisterITKMonitorVTK.cxx)<br>TARGET_LINK_LIBRARIES(itkRegisterITKMonitorVTK&nbsp; ITKVTKIntegration ITKBasicFilters ITKIO vtkRendering vtkIO vtkHybrid)</div>

<div>=========================================================================</div>
<div>&nbsp;</div>
<div>Will cause Link error while using MS visual studio 2005.</div>
<div>The compiling is ok, and the code &quot;itkRegisterITKMonitorVTK.cxx&quot;&nbsp; is exactly the same as the one in InsightApplication\Auxiliary\vtk\itkRegisterITKMonitorVTK.cxx.</div>
<div>&nbsp;</div>
<div>Error&nbsp;5&nbsp;error LNK2001: unresolved external symbol &quot;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 &quot; (<a href="mailto:?PrintSelf@CostFunction@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z">?PrintSelf@CostFunction@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z</a>)&nbsp;itkRegisterITKMonitorVTK.obj&nbsp;<br>
</div>
<div>&nbsp;</div>
<div>Thanks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Charles</div></div>