[Insight-users] ITK 1.6 and VTK compilation

Sergio Andres sergio at unizar.es
Mon, 09 Feb 2004 17:35:32 +0100


Hi again,

I tried to delete Utilities/png, re-run cmake and build again, but I got 
new errors because of dependencies
of itk Readers on png  files.

>
> I mean an empty build tree that did not have a previous ITK build in 
> it.  Please find delete Utilities/png from the build tree, re-run 
> cmake, and try the build again.  We need to figure out why the itkpng 
> library does not have proper mangling of the png symbols.
>
> Thanks,
> -Brad
>


Then I downloaded the version on CVS, and compiled and tried to build my 
application.
And I got only  4 errors related to vtkzlib.lib and itkzlib.lib 
conficts. But those related to png have disappeared.

vtkzlib.lib(deflate.obj) : error LNK2005: _deflate_copyright already 
defined in itkzlib.lib(deflate.obj)
vtkzlib.lib(trees.obj) : error LNK2005: __length_code already defined in 
itkzlib.lib(trees.obj)
vtkzlib.lib(trees.obj) : error LNK2005: __dist_code already defined in 
itkzlib.lib(trees.obj)


After this, I compared files of two versions (ITK 1.6 and ITK CVS) and I 
found differences in :

Utilities / png / itk_png_mangle.h

The CVS version has the following lines that 1.6 version file does not 
contain:

line 153:  #define png_libpng_ver itk_png_libpng_ver

line 158:  #define png_pass_dsp_mask itk_png_pass_dsp_mask
line 159:  #define png_pass_mask itk_png_pass_mask
line 160:  #define png_pass_yinc itk_png_pass_yinc
line 161:  #define png_pass_ystart itk_png_pass_ystart
line 162:  #define png_pass_inc itk_png_pass_inc
line 163:  #define png_pass_start itk_png_pass_start


The file Utilities / zlib / itk_zlib_mangle.h is also different in CVS 
version. It contains the following lines:

line 68:    #define inflate_copyright itk_inflate_copyright

line 71:   #define inflate_mask itk_inflate_mask

line 81:   #define z_errmsg itk_z_errmsg


So, I suppose that all errors that I get are related to this files.... 
and maybe something is necessary here (itk_zlib_mangle.h)


Sergio.