[Insight-users] [vtkusers] LNK2019 error when compiling project with ITK and VTK
Bill Lorensen
bill.lorensen at gmail.com
Sun Apr 10 15:25:14 EDT 2011
Please keep discussion on list.
Sorry, I have never used VS except via cmake generated solution files.
Bill
On Sun, Apr 10, 2011 at 3:22 PM, Bc. Michal Srna <michal at srna.info> wrote:
> I am not using CMake to build my project, I just wanted to know, what can
> cause those errors. I created new project in MVSC++ added ale dependencies
> for ITK and it worked, so I tought to do the same with VTK and I got those
> errors.
>
> Thanks anyway...
>
>
> 2011/4/10 Bill Lorensen <bill.lorensen at gmail.com>
>
>> Are you using CMake to build your project? If so, you should not add
>> change the VS project properties or additional dependencies.
>>
>> It is possible to build an external project without CMake, but it is
>> tricky. There are many examples here:
>> http://itk.org/Wiki/ITK/Examples
>>
>> that combine vtk and itk, but they all use cmake.
>>
>> Bill
>>
>> On Sun, Apr 10, 2011 at 1:08 PM, Bc. Michal Srna <michal at srna.info>wrote:
>>
>>> 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
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>
>
> --
> S pozdravem Bc. Michal Srna
>
> Fotografické portfolio:
> http://michalsrna.cz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110410/a2c6145a/attachment.htm>
More information about the Insight-users
mailing list