[Insight-users] tiff and jpeg duplicate symbols at link time.

Luis Ibanez luis.ibanez at kitware.com
Mon, 19 Jan 2004 14:04:11 -0500


Hi Corinne,

This is due to the fact that both ITK and VTK
are supporting the TIFF, JPEG and PNG libraries.

Symbols from the VTK tiff library get in conflict
at link time with symbols from the ITK library.

This was recently solved in ITK...by masking the
common symbols.

My guess is that you don't have a fully updated
ITK version.  You may want to do

             cvs update -dPA

at the top level of your source checkout, and
then rebuild ITK.

Please let us know if you still find any problems,

Thanks


   Luis


----------------------------
Corinne Mattmann wrote:

> Hi Luis,
> 
....
> If I input the following code I get a whole bunch of link errors
> (without this 5 lines the code compiles fine). Do you have any ideas
> what could be wrong?
...
> 
> Thanks,
> Corinne
> 
> 
>   typedef itk::ImageFileWriter<ImageType> ImageWriteType;
>     ImageWriteType::Pointer Image1Writer = ImageWriteType::New();
>     Image1Writer->SetInput(vtk2itk_Image1->GetImporter()->GetOutput());
>     Image1Writer->SetFileName("image1.mhd");
>     Image1Writer->Write();
> 
> Compiling...
> test7_Corinne.cxx
> Linking...
> itktiff.lib(tif_strip.obj) : error LNK2005: _TIFFDefaultStripSize
> already defined in vtktiff.lib(vtktiff.dll)
> itktiff.lib(tif_open.obj) : error LNK2005: _TIFFClientOpen already
> defined in vtktiff.lib(vtktiff.dll)
> itktiff.lib(tif_dir.obj) : error LNK2005: _TIFFSetField already defined
> in vtktiff.lib(vtktiff.dll)
> itktiff.lib(tif_dir.obj) : error LNK2005: _TIFFGetField already defined
> in vtktiff.lib(vtktiff.dll)
> itktiff.lib(tif_write.obj) : error LNK2005: _TIFFWriteScanline already
> defined in vtktiff.lib(vtktiff.dll)
> itkjpeg.lib(jdapistd.obj) : error LNK2005: _jpeg_start_decompress
> already defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jdapistd.obj) : error LNK2005: _jpeg_read_scanlines already
> defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jcapimin.obj) : error LNK2005: _jpeg_CreateCompress already
> defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jcapimin.obj) : error LNK2005: _jpeg_destroy_compress
> already defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jcapimin.obj) : error LNK2005: _jpeg_finish_compress already
> defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jcparam.obj) : error LNK2005: _jpeg_set_quality already
> defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jcparam.obj) : error LNK2005: _jpeg_set_defaults already
> defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jcparam.obj) : error LNK2005: _jpeg_simple_progression
> already defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jcapistd.obj) : error LNK2005: _jpeg_start_compress already
> defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jcapistd.obj) : error LNK2005: _jpeg_write_scanlines already
> defined in vtkjpeg.lib(vtkjpeg.dll)
> itkjpeg.lib(jdmaster.obj) : error LNK2005: _jpeg_calc_output_dimensions
> already defined in vtkjpeg.lib(vtkjpeg.dll)
> itktiff.lib(tif_strip.obj) : warning LNK4006: _TIFFDefaultStripSize
> already defined in vtktiff.lib(vtktiff.dll); second definition ignored
> itktiff.lib(tif_open.obj) : warning LNK4006: _TIFFClientOpen already
> defined in vtktiff.lib(vtktiff.dll); second definition ignored
> itktiff.lib(tif_dir.obj) : warning LNK4006: _TIFFSetField already
> defined in vtktiff.lib(vtktiff.dll); second definition ignored
> itktiff.lib(tif_dir.obj) : warning LNK4006: _TIFFGetField already
> defined in vtktiff.lib(vtktiff.dll); second definition ignored
> itktiff.lib(tif_write.obj) : warning LNK4006: _TIFFWriteScanline already
> defined in vtktiff.lib(vtktiff.dll); second definition ignored
> itkjpeg.lib(jdapistd.obj) : warning LNK4006: _jpeg_start_decompress
> already defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jdapistd.obj) : warning LNK4006: _jpeg_read_scanlines
> already defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jcapimin.obj) : warning LNK4006: _jpeg_CreateCompress
> already defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jcapimin.obj) : warning LNK4006: _jpeg_destroy_compress
> already defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jcapimin.obj) : warning LNK4006: _jpeg_finish_compress
> already defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jcparam.obj) : warning LNK4006: _jpeg_set_quality already
> defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jcparam.obj) : warning LNK4006: _jpeg_set_defaults already
> defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jcparam.obj) : warning LNK4006: _jpeg_simple_progression
> already defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jcapistd.obj) : warning LNK4006: _jpeg_start_compress
> already defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jcapistd.obj) : warning LNK4006: _jpeg_write_scanlines
> already defined in vtkjpeg.lib(vtkjpeg.dll); second definition ignored
> itkjpeg.lib(jdmaster.obj) : warning LNK4006:
> _jpeg_calc_output_dimensions already defined in
> vtkjpeg.lib(vtkjpeg.dll); second definition ignored
>    Creating library D:\packwin\vtkMy\bin\bin\Debug/test7_Corinne.lib and
> object D:\packwin\vtkMy\bin\bin\Debug/test7_Corinne.exp
> D:\packwin\vtkMy\bin\bin\Debug/test7_Corinne.exe : fatal error LNK1169:
> one or more multiply defined symbols found
> Error executing link.exe.
> 
> test7_Corinne.exe - 17 error(s), 16 warning(s)
> 
> 
> 
>