<div><br></div>Hi Suyang,<div><br></div><div>You are simply missing to link with the library</div><div><br></div><div> ITKStatistics</div><div><br></div><div><br></div><div>Please search for the</div><div>
<br></div><div> TARGET_LINK_LIBRARIES </div><div><br></div><div>command in your CMakeLists.txt file and add</div><div>ITKStatistics to the list of libraries.</div><div><br></div><div><br></div><div> Regards,</div>
<div><br></div><div><br></div><div> Luis<br><br></div><div><br></div><div>--------------------------------------------------------------------<br><div class="gmail_quote">On Thu, Feb 11, 2010 at 6:59 PM, Suyang Mei <span dir="ltr"><<a href="mailto:suyang_mei@yahoo.com">suyang_mei@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Hi, all -<br><br> I am using ITK 3.16 in vista with vs 2008, and I tried to compile the example codes <br>
itkLabelStatisticsImageFilterTest.cxx under InsightToolkit-3.16.0\Testing\Code\BasicFilters, got the following errors -<br><br> Any idea what is going on here?<br><br> Thanks in advance for any help.<br><br>Suyang<br><br>
Error 2 error LNK2019: unresolved external symbol "public: bool __thiscall itk::Statistics::DenseFrequencyContainer::IncreaseFrequency(unsigned long,float)" (?IncreaseFrequency@DenseFrequencyContainer@Statistics@itk@@QAE_NKM@Z) referenced in function "public: bool __thiscall itk::Statistics::Histogram<double,1,class itk::Statistics::DenseFrequencyContainer>::IncreaseFrequency(unsigned long const &,float)"
(?IncreaseFrequency@?$Histogram@N$00VDenseFrequencyContainer@Statistics@itk@@@Statistics@itk@@QAE_NABKM@Z) zzLabelStatisticsImageFilterTest.obj <br><br>Error 3 error LNK2019: unresolved external symbol "protected: __thiscall itk::Statistics::DenseFrequencyContainer::DenseFrequencyContainer(void)" (??0DenseFrequencyContainer@Statistics@itk@@IAE@XZ) referenced in function "public: static class itk::SmartPointer<class itk::Statistics::DenseFrequencyContainer> __cdecl itk::Statistics::DenseFrequencyContainer::New(void)" (?New@DenseFrequencyContainer@Statistics@itk@@SA?AV?$SmartPointer@VDenseFrequencyContainer@Statistics@itk@@@3@XZ) zzLabelStatisticsImageFilterTest.obj <br>
<br>Error 4 error LNK2019: unresolved external symbol "public: float __thiscall itk::Statistics::DenseFrequencyContainer::GetFrequency(unsigned
long)const " (?GetFrequency@DenseFrequencyContainer@Statistics@itk@@QBEMK@Z) referenced in function "public: virtual float __thiscall itk::Statistics::Histogram<double,1,class itk::Statistics::DenseFrequencyContainer>::GetFrequency(unsigned long const &)const " (?GetFrequency@?$Histogram@N$00VDenseFrequencyContainer@Statistics@itk@@@Statistics@itk@@UBEMABK@Z) zzLabelStatisticsImageFilterTest.obj <br>
<br><br>Error 5 error LNK2019: unresolved external symbol "public: void __thiscall itk::Statistics::DenseFrequencyContainer::Initialize(unsigned long)" (?Initialize@DenseFrequencyContainer@Statistics@itk@@QAEXK@Z) referenced in function "public: void __thiscall itk::Statistics::Histogram<double,1,class itk::Statistics::DenseFrequencyContainer>::Initialize(class itk::Size<1> const &)"
(?Initialize@?$Histogram@N$00VDenseFrequencyContainer@Statistics@itk@@@Statistics@itk@@QAEXABV?$Size@$00@3@@Z) zzLabelStatisticsImageFilterTest.obj <br><br>Error 6 error LNK2019: unresolved external symbol "public: void __thiscall itk::Statistics::DenseFrequencyContainer::SetToZero(void)" (?SetToZero@DenseFrequencyContainer@Statistics@itk@@QAEXXZ) referenced in function "public: void __thiscall itk::Statistics::Histogram<double,1,class itk::Statistics::DenseFrequencyContainer>::SetToZero(void)" (?SetToZero@?$Histogram@N$00VDenseFrequencyContainer@Statistics@itk@@@Statistics@itk@@QAEXXZ) zzLabelStatisticsImageFilterTest.obj <br>
<br><br><br><br></td></tr></tbody></table><br>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>