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

David Doria daviddoria at gmail.com
Thu Jan 20 07:23:41 EST 2011


> 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

That means you are not linking to the correct libraries. How are you
trying to compile these examples? You should be using CMake. There is
an example CMakeLists.txt file attached to every example on the
Examples Wiki (http://www.itk.org/Wiki/ITK/Examples). Here is one:

http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/SquaredDifferenceImageFilter

You can find a crash course on CMake here:

http://www.vtk.org/Wiki/VTK/Presentations

Let us know if you have any problems.

Good luck,

David


More information about the Insight-users mailing list