[Insight-users] ITK 1.6 and VTK compilation

Brad King brad.king at kitware.com
Mon, 09 Feb 2004 09:15:44 -0500


Sergio Andres wrote:
> 
> Hi all,
> 
> I have just download the ITK 1.6 release.
> 
> I had to change some methods calls to vnl classes 
> (vnl_vector<>.resize()) and  itkImage::GetSpacing, in my program.

This is because we upgraded the vnl version that comes with ITK and 
inherited this change.  The vnl interface rarely changes, so hopefully 
this is the last time.

> 
> Then, I re-compiled again and I got some warnings like these:
> ....
> D:\sandres\SourceCode\ITK_Toolkit_Source\InsightToolkit-1.6.0\InsightToolkit-1.6.0\Code\Common\itkFixedArray.h(104) 
> :
> warning C4284: return type for 
> 'itk::FixedArray<float,2>::ConstReverseIterator::operator ->' is 'const 
> float *' (ie; not a UDT or r
> eference to a UDT.  Will produce errors if applied using infix notation)
>        
> D:\sandres\SourceCode\ITK_Toolkit_Source\InsightToolkit-1.6.0\InsightToolkit-1.6.0\Code\Common\itkVector.h(57) 
> : see reference to class template instantiation 
> 'itk::FixedArray<float,2>' being compiled
>        
> D:\sandres\SourceCode\ITK_Toolkit_Source\InsightToolkit-1.6.0\InsightToolkit-1.6.0\Code\IO\itkDefaultConvertPixelTraits.h(172) 
> : see reference to class template instantiation 'itk::Vector<float,2>' 
> being compiled
> ...
> C:\Win\Mvs\VC98\INCLUDE\vector(156) : warning C4018: '<' : 
> signed/unsigned mismatch

Most of these warnings have been fixed in the CVS version, but it is 
safe to ignore them for 1.6.0.

> ITK-VTK
> ---------------------
> I got some errors when I compiled other application that did not produce 
> any error before upgrading to 1.6.
> This aplication uses ITK and VTK and linking errors are :
> ...
> vtkpng.lib(png.obj) : error LNK2005: _png_pass_dsp_mask already defined 
> in itkpng.lib(png.obj)
> vtkpng.lib(png.obj) : error LNK2005: _png_pass_mask already defined in 
> itkpng.lib(png.obj)
> vtkpng.lib(png.obj) : error LNK2005: _png_pass_yinc already defined in 
> itkpng.lib(png.obj)
> vtkpng.lib(png.obj) : error LNK2005: _png_pass_ystart already defined in 
> itkpng.lib(png.obj)
> vtkpng.lib(png.obj) : error LNK2005: _png_pass_inc already defined in 
> itkpng.lib(png.obj)
> vtkpng.lib(png.obj) : error LNK2005: _png_pass_start already defined in 
> itkpng.lib(png.obj)

Was this a clean build tree for ITK 1.6?  The itkpng library should have 
mangled symbols like _itk_png_pass_dsp_mask to avoid these conflicts.

-Brad