[Insight-users] compiling VTK and ITK
Sergio Andres
sergio at unizar.es
Mon, 26 Apr 2004 16:39:42 +0200
Hi,
Thanks for your previous answer, but...
I download ITK and VTK from CVS and I get 13 link errors:
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_get_io_ptr
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_write_end
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_write_image
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_set_swap
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_write_info
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_set_IHDR
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_set_error_fn
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_init_io
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_set_write_fn
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_destroy_write_struct
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_create_info_struct
vtkio.lib(vtkPNGWriter.obj) : error LNK2001: unresolved external symbol
_vtk_png_create_write_struct
Do I have to do anything more with the code before compiling ??
Thanks.
Regards,
Sergio.
Brad King escribió:
> Sergio Andres wrote:
>
>>
>> Hi all,
>>
>> I am trying to compile my application using ITK 1.6 and VTK 4.2 ,
>> but I get some link errors related to png and jpeg libraries...
>>
>> The error messages are like these:
>>
>> 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)
>> vtkpng.lib(png.obj) : error LNK2005: _png_zTXt already defined in
>> itkpng.lib(png.obj)
>> vtkpng.lib(png.obj) : error LNK2005: _png_tRNS already defined in
>> itkpng.lib(png.obj)
>>
>> I suppose that they are conflicts between ITK and VTK ..
>> but I don't know if I am doing things wrong..
>>
>> Other messages are related to the following libraries: vtkzlib.lib,
>> itkvnl.lib, ITKIO.lib
>>
>> Any help will be appreciated..
>
>
> You are not doing anything wrong. This is a problem with ITK 1.6 and
> VTK 4.2 if the IO libraries from both are linked into the same
> program. They both provide their own copies of the png library. This
> has been fixed in the CVS version of ITK and VTK by mangling the png
> library symbols to start with itk_ or vtk_ and avoid the conflict.
>
> -Brad
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>