[Insight-users] The complie error in ITK examples: Image2.cxx

Wei Sun sunweimail at foxmail.com
Thu Jan 20 02:41:35 EST 2011


Dear All,

I a beginner to ITK.  The  InsightToolkit\Examples\DataRepresentation\Image\Image1.cxx could be excecuted in my Visual Studio 2010. However, when I try to compile the Image2.cxx (about the ImageFileReader part) in the ITK examples, I got the follwing compile error:

 
2>  Image2.cxx
 
2>E:\softwares\vs2010\VC\include\xutility(2227): warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
 
2>          E:\softwares\vs2010\VC\include\xutility(2212) : see declaration of 'std::_Copy_impl'
 
2>          f:\insighttoolkit\insighttoolkit\code\io\itkImageFileReader.txx(439) : see reference to function template instantiation '_OutIt std::copy<const unsigned char*,unsigned char*>(_InIt,_InIt,_OutIt)' being compiled
 
2>          with
 
2>          [
 
2>              _OutIt=unsigned char *,
 
2>              _InIt=const unsigned char *
 
2>          ]
 
2>          f:\insighttoolkit\insighttoolkit\code\io\itkImageFileReader.txx(361) : while compiling class template member function 'void itk::ImageFileReader<TOutputImage>::GenerateData(void)'
 
2>          with
 
2>          [
 
2>              TOutputImage=ImageType
 
2>          ]
 
2>          ..\..\..\InsightToolkit\Examples\Installation\Image2.cxx(87) : see reference to class template instantiation 'itk::ImageFileReader<TOutputImage>' being compiled
 
2>          with
 
2>          [
 
2>              TOutputImage=ImageType
 
2>          ]
 
2>Image2.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall itk::ImageIORegion::~ImageIORegion(void)" (??1ImageIORegion at itk@@UAE at XZ) referenced in function __unwindfunclet$??0?$ImageFileReader at V?$Image at E$02 at itk@@V?$DefaultConvertPixelTraits at E@2@@itk@@IAE at XZ$0
 
2>Image2.obj : error LNK2019: unresolved external symbol "public: __thiscall itk::ImageIORegion::ImageIORegion(void)" (??0ImageIORegion at itk@@QAE at XZ) referenced in function "protected: __thiscall itk::ImageFileReader<class itk::Image<unsigned char,3>,class itk::DefaultConvertPixelTraits<unsigned char> >::ImageFileReader<class itk::Image<unsigned char,3>,class itk::DefaultConvertPixelTraits<unsigned char> >(void)" (??0?$ImageFileReader at V?$Image at E$02 at itk@@V?$DefaultConvertPixelTraits at E@2@@itk@@IAE at XZ)
 
2>Image2.obj : error LNK2019: unresolved external symbol "public: static class itk::SmartPointer<class itk::ImageIOBase> __cdecl itk::ImageIOFactory::CreateImageIO(char const *,enum itk::ImageIOFactory::FileModeType)" (?CreateImageIO at ImageIOFactory@itk@@SA?AV?$SmartPointer at VImageIOBase@itk@@@2 at PBDW4FileModeType@12@@Z) referenced in function __catch$?GenerateOutputInformation@?$ImageFileReader at V?$Image at E$02 at itk@@V?$DefaultConvertPixelTraits at E@2@@itk@@UAEXXZ$0
 
2>Image2.obj : error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl itk::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::ImageIORegion const &)" (??6itk@@YAAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@AAV12 at ABVImageIORegion@0@@Z) referenced in function "public: virtual void __thiscall itk::ImageFileReader<class itk::Image<unsigned char,3>,class itk::DefaultConvertPixelTraits<unsigned char> >::EnlargeOutputRequestedRegion(class itk::DataObject *)" (?EnlargeOutputRequestedRegion@?$ImageFileReader at V?$Image at E$02 at itk@@V?$DefaultConvertPixelTraits at E@2@@itk@@UAEXPAVDataObject at 2@@Z)
 
Thanks in advance!
Best regards,
Wei Sun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110120/a85fb996/attachment.htm>


More information about the Insight-users mailing list