<div dir="ltr"><div>Dear all,</div>
<div> </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> INCLUDE(${ITK_USE_FILE})<br>ENDIF(ITK_FOUND)</div>
<div>FIND_PACKAGE (VTK)<br>IF ( VTK_FOUND)<br> INCLUDE( ${USE_VTK_FILE} )<br>ENDIF( VTK_FOUND)</div>
<div> </div>
<div>ADD_LIBRARY(ITKVTKIntegration vtkRegistrationMonitor.cxx vtkKWImage.cxx vtkKWImageIO.cxx)<br>ADD_EXECUTABLE(itkRegisterITKMonitorVTK itkRegisterITKMonitorVTK.cxx)<br>TARGET_LINK_LIBRARIES(itkRegisterITKMonitorVTK ITKVTKIntegration ITKBasicFilters ITKIO vtkRendering vtkIO vtkHybrid)</div>
<div>=========================================================================</div>
<div> </div>
<div>Will cause Link error while using MS visual studio 2005.</div>
<div>The compiling is ok, and the code "itkRegisterITKMonitorVTK.cxx" is exactly the same as the one in InsightApplication\Auxiliary\vtk\itkRegisterITKMonitorVTK.cxx.</div>
<div> </div>
<div>Error 5 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 " (<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>) itkRegisterITKMonitorVTK.obj <br>
</div>
<div> </div>
<div>Thanks </div>
<div> Charles</div></div>