[Insight-users] compiling VTK and ITK

Brad King brad.king at kitware.com
Mon, 26 Apr 2004 13:54:49 -0400


Sergio Andres wrote:
>>
>> Is your project built by CMake?  If so, the vtkpng library should have 
>> been included automatically when you linked to vtkIO.
>>
>> -Brad 
> 
> 
> 
> Yes it is.
> 
> 
> Now I get new link errors, but these are different:
> 
> uzMatcher.lib(uzASMMatcher.obj) : error LNK2001: unresolved external 
> symbol "public: virtual void __thiscall itk::Region::Print(class 
> std::basic_ostream<char,struct std::char_traits<char> > &)const " 
> (?Print at Region at itk at  at UBEXAAV?$basic_ostream at DU?$ch
> ar_traits at D at std at  at  at std at  at  at Z)
> uzMatcher.lib(uzASMMatcher.obj) : error LNK2001: unresolved external 
> symbol "public: virtual bool __thiscall 
> itk::ProcessObject::GetReleaseDataFlag(void)" 
> (?GetReleaseDataFlag at ProcessObject at itk at  at UAE_NXZ)
> uzMatcher.lib(uzASMMatcher.obj) : error LNK2001: unresolved external 
> symbol "public: void __thiscall 
> itk::DataObject::DisconnectPipeline(void)const " 
> (?DisconnectPipeline at DataObject at itk at  at QBEXXZ)
> uzMatcher.lib(uzASMMatcher.obj) : error LNK2001: unresolved external 
> symbol "public: void __thiscall itk::LightObject::Print(class 
> std::basic_ostream<char,struct std::char_traits<char> > &)const " 
> (?Print at LightObject at itk at  at QBEXAAV?$basic_ostream at DU?$
> char_traits at D at std at  at  at std at  at  at Z)
> uzPDSets.lib(uzPDShapeReader.obj) : error LNK2001: unresolved external 
> symbol "public: void __thiscall itk::LightObject::Print(class 
> std::basic_ostream<char,struct std::char_traits<char> > &)const " 
> (?Print at LightObject at itk at  at QBEXAAV?$basic_ostream at DU
> ?$char_traits at D at std at  at  at std at  at  at Z)
> uzPDSets.lib(uzPDShape2D.obj) : error LNK2001: unresolved external 
> symbol "public: void __thiscall itk::LightObject::Print(class 
> std::basic_ostream<char,struct std::char_traits<char> > &)const " 
> (?Print at LightObject at itk at  at QBEXAAV?$basic_ostream at DU?$ch
> ar_traits at D at std at  at  at std at  at  at Z)
> uzPDSets.lib(uzPDShape3D.obj) : error LNK2001: unresolved external 
> symbol "public: void __thiscall itk::LightObject::Print(class 
> std::basic_ostream<char,struct std::char_traits<char> > &)const " 
> (?Print at LightObject at itk at  at QBEXAAV?$basic_ostream at DU?$ch
> ar_traits at D at std at  at  at std at  at  at Z)
> Debug/FitImageTest.exe : fatal error LNK1120: 4 unresolved externals
> Error executing link.exe.
> 
> None of them appeared before using VTK release from CVS. And I have no 
> idea about them.
> I would appreciate any help.

This does not seem to have anything to do with VTK.  It looks like 
you're not linking to the ITKCommon library.  Perhaps your application 
did not fully rebuild when you upgraded the version of ITK and there is 
a mismatch between the header used to build your .obj files and the ITK 
library.

-Brad