[Insight-users] compiling VTK and ITK

Miller, James V (Research) millerjv at crd.ge.com
Mon, 26 Apr 2004 14:39:19 -0400


A change was made to the Print() method of ITK classes such 
that it takes an additional argument (which has a default value).

Your link error is due to your object files for your projects
being out of date with ITK.  If you force your object files to 
be rebuilt (either by telling the IDE to compile the files directly
or by doing a clean then a build) then you the link error should
be resolved.

Jim


-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com]
Sent: Monday, April 26, 2004 1:55 PM
To: Sergio Andres
Cc: insight-users at itk.org
Subject: Re: [Insight-users] compiling VTK and ITK


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
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users