[Insight-users] itk to vtk connection linker errors

hossein hossein9876 at gmail.com
Thu Nov 6 23:26:38 EST 2008


hi,
I want to connect itk to vtk. I used the guidline mentioned in tutorial II
at the itk website. The following is part of the code i use:

#include "itkImageToVTKImageFilter.h"
//other includes...

//some code here...

typedef itk::VTKImageExport<ImageType3D> ExporterFilterType;
ExporterFilterType::Pointer m_Exporter = ExporterFilterType::New();

//some code here...

when i compile i get the following errors:
Error    1    error LNK2001: unresolved external symbol "protected:
__thiscall itk::VTKImageExportBase::VTKImageExportBase(void)"
(??0VTKImageExportBase at itk@@IAE at XZ)    itktester.obj    itktester
Error    2    error LNK2001: unresolved external symbol "protected: virtual
void __thiscall itk::VTKImageExportBase::PrintSelf(class
std::basic_ostream<char,struct std::char_traits<char> > &,class
itk::Indent)const " (?PrintSelf at VTKImageExportBase@itk@
@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z)
itktester.obj    itktester
Error    3    error LNK2001: unresolved external symbol "protected: virtual
void __thiscall itk::VTKImageExportBase::UpdateInformationCallback(void)"
(?UpdateInformationCallback at VTKImageExportBase@itk@@MAEXXZ)
itktester.obj    itktester
Error    4    error LNK2001: unresolved external symbol "protected: virtual
int __thiscall itk::VTKImageExportBase::PipelineModifiedCallback(void)"
(?PipelineModifiedCallback at VTKImageExportBase@itk@@MAEHXZ)
itktester.obj    itktester
Error    5    error LNK2001: unresolved external symbol "protected: virtual
void __thiscall itk::VTKImageExportBase::UpdateDataCallback(void)"
(?UpdateDataCallback at VTKImageExportBase@itk@@MAEXXZ)    itktester.obj
itktester
Error    6    fatal error LNK1120: 5 unresolved externals    D:\c++
codes\itktester\Release\itktester.exe    itktester

p.s. The project name is called itktester.

If i remove the following line i no longer get these errors:
ExporterFilterType::Pointer m_Exporter = ExporterFilterType::New();

I am using itk 3.6, vtk 5.0.2, visual studio 2008 sp1.

Any help will be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081107/f0451359/attachment.htm>


More information about the Insight-users mailing list