[vtkusers] LNK2019 error when compiling project with ITK and VTK

Bc. Michal Srna michal at srna.info
Sun Apr 10 13:08:35 EDT 2011


Hello VTK users,

in my project I use ITKv4 and now I would like to use some features of VTK.
I downloaded the latest version vtk-5.6.1, used CMAKE, without errors build
VTK with MVSC++ 2008 and added path to all VTK libraries to project
properties. I also added all VTK *.lib files to Additional Dependencies
under project properties.

Now I want only to connect output of ITK pipeline to VTK, the code is:

typedef itk::ImageToVTKImageFilter<TransformedImageType> ConnectorType;
ConnectorType::Pointer connector= ConnectorType::New();

connector->SetInput( TransformedImportFilter->GetOutput() );

where TransformedImportFilter is ITK output of ImportImageFilter.

I also included this headers:

#include "itkImageToVTKImageFilter.h"

When I want to compile my project, I get these errors:

1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: void * __thiscall
itk::VTKImageExportBase::GetCallbackUserData(void)"
(?GetCallbackUserData at VTKImageExportBase@itk@@QAEPAXXZ) referenced in
function "protected: __thiscall itk::ImageToVTKImageFilter<class
itk::Image<short,3> >::ImageToVTKImageFilter<class itk::Image<short,3>
>(void)" (??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: void * (__cdecl*__thiscall
itk::VTKImageExportBase::GetBufferPointerCallback(void)const )(void *)"
(?GetBufferPointerCallback at VTKImageExportBase@itk@@QBEP6APAXPAX at ZXZ)
referenced in function "protected: __thiscall
itk::ImageToVTKImageFilter<class itk::Image<short,3>
>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"
(??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: int * (__cdecl*__thiscall
itk::VTKImageExportBase::GetDataExtentCallback(void)const )(void *)"
(?GetDataExtentCallback at VTKImageExportBase@itk@@QBEP6APAHPAX at ZXZ) referenced
in function "protected: __thiscall itk::ImageToVTKImageFilter<class
itk::Image<short,3> >::ImageToVTKImageFilter<class itk::Image<short,3>
>(void)" (??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: void (__cdecl*__thiscall
itk::VTKImageExportBase::GetUpdateDataCallback(void)const )(void *)"
(?GetUpdateDataCallback at VTKImageExportBase@itk@@QBEP6AXPAX at ZXZ) referenced
in function "protected: __thiscall itk::ImageToVTKImageFilter<class
itk::Image<short,3> >::ImageToVTKImageFilter<class itk::Image<short,3>
>(void)" (??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: void (__cdecl*__thiscall
itk::VTKImageExportBase::GetPropagateUpdateExtentCallback(void)const )(void
*,int *)" (?GetPropagateUpdateExtentCallback at VTKImageExportBase@itk@
@QBEP6AXPAXPAH at ZXZ) referenced in function "protected: __thiscall
itk::ImageToVTKImageFilter<class itk::Image<short,3>
>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"
(??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: int (__cdecl*__thiscall
itk::VTKImageExportBase::GetNumberOfComponentsCallback(void)const )(void *)"
(?GetNumberOfComponentsCallback at VTKImageExportBase@itk@@QBEP6AHPAX at ZXZ)
referenced in function "protected: __thiscall
itk::ImageToVTKImageFilter<class itk::Image<short,3>
>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"
(??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: char const * (__cdecl*__thiscall
itk::VTKImageExportBase::GetScalarTypeCallback(void)const )(void *)"
(?GetScalarTypeCallback at VTKImageExportBase@itk@@QBEP6APBDPAX at ZXZ) referenced
in function "protected: __thiscall itk::ImageToVTKImageFilter<class
itk::Image<short,3> >::ImageToVTKImageFilter<class itk::Image<short,3>
>(void)" (??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: class itk::VTKImageExportBase::CallbackTypeProxy __thiscall
itk::VTKImageExportBase::GetOriginCallback(void)const "
(?GetOriginCallback at VTKImageExportBase@itk@@QBE?AVCallbackTypeProxy at 12@XZ)
referenced in function "protected: __thiscall
itk::ImageToVTKImageFilter<class itk::Image<short,3>
>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"
(??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: class itk::VTKImageExportBase::CallbackTypeProxy __thiscall
itk::VTKImageExportBase::GetSpacingCallback(void)const "
(?GetSpacingCallback at VTKImageExportBase@itk@@QBE?AVCallbackTypeProxy at 12@XZ)
referenced in function "protected: __thiscall
itk::ImageToVTKImageFilter<class itk::Image<short,3>
>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"
(??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: int * (__cdecl*__thiscall
itk::VTKImageExportBase::GetWholeExtentCallback(void)const )(void *)"
(?GetWholeExtentCallback at VTKImageExportBase@itk@@QBEP6APAHPAX at ZXZ)
referenced in function "protected: __thiscall
itk::ImageToVTKImageFilter<class itk::Image<short,3>
>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"
(??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: int (__cdecl*__thiscall
itk::VTKImageExportBase::GetPipelineModifiedCallback(void)const )(void *)"
(?GetPipelineModifiedCallback at VTKImageExportBase@itk@@QBEP6AHPAX at ZXZ)
referenced in function "protected: __thiscall
itk::ImageToVTKImageFilter<class itk::Image<short,3>
>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"
(??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"public: void (__cdecl*__thiscall
itk::VTKImageExportBase::GetUpdateInformationCallback(void)const )(void *)"
(?GetUpdateInformationCallback at VTKImageExportBase@itk@@QBEP6AXPAX at ZXZ)
referenced in function "protected: __thiscall
itk::ImageToVTKImageFilter<class itk::Image<short,3>
>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"
(??0?$ImageToVTKImageFilter at V?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2019: unresolved external symbol
"protected: __thiscall itk::VTKImageExportBase::VTKImageExportBase(void)"
(??0VTKImageExportBase at itk@@IAE at XZ) referenced in function "protected:
__thiscall itk::VTKImageExport<class itk::Image<short,3>
>::VTKImageExport<class itk::Image<short,3> >(void)" (??0?$VTKImageExport at V
?$Image at F$02 at itk@@@itk@@IAE at XZ)
1>visualization_routines.obj : error LNK2001: unresolved external symbol
"protected: virtual void __thiscall
itk::VTKImageExportBase::UpdateInformationCallback(void)"
(?UpdateInformationCallback at VTKImageExportBase@itk@@MAEXXZ)
1>visualization_routines.obj : error LNK2001: unresolved external symbol
"protected: virtual int __thiscall
itk::VTKImageExportBase::PipelineModifiedCallback(void)"
(?PipelineModifiedCallback at VTKImageExportBase@itk@@MAEHXZ)
1>visualization_routines.obj : error LNK2001: unresolved external symbol
"protected: virtual void __thiscall
itk::VTKImageExportBase::UpdateDataCallback(void)"
(?UpdateDataCallback at VTKImageExportBase@itk@@MAEXXZ)
1>visualization_routines.obj : 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)

Don't know, what am I doing wrong?



Best regards,

Michal

Faculty of Biomedical Engineering CTU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110410/1036dc4e/attachment.htm>


More information about the vtkusers mailing list