[Insight-users] Compiling ITK on Windows

Luis Ibanez luis.ibanez@kitware.com
Wed, 05 Mar 2003 11:14:16 -0500


Hi Raghavendra,

The error messages indicate that you have another
version of the PNG library in your system.

This version is conflicting with the one that is
distributed with ITK in the "Utilities" directory.

You will have to locate this DLL library in you
disk and make sure that it is not included in
your path whenever you are building ITK.

What is happening at this point is that the linker
finds your png system library before it finds the
one in ITK: itkpng.lib


Please let us know if you have any questions,


Thanks

Luis


-------------------------------------------

Raghavendra Chandrashekara wrote:
> Hi Luis,
> 
> Thanks for the info about not writing:
> 
>  using namespace std;
> 
> Perhaps it would be a good idea to state this in the ITK manual more
> explicitly so that other users will also be aware of the conflicts that can
> be caused. I am still having problems with the compiling the Windows version
> of ITK. I regenerated the makefiles and tried to build just the png library.
> These are the errors that I am getting:
> 
> ------ Build started: Project: itkpng, Configuration: Debug Win32 ------
> 
> Compiling...
> pngwutil.c
> \packages\InsightCVS\Utilities\png\pngwutil.c(66) : warning C4273:
> 'png_write_chunk' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwutil.c(79) : warning C4273:
> 'png_write_chunk_start' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwutil.c(101) : warning C4273:
> 'png_write_chunk_data' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwutil.c(113) : warning C4273:
> 'png_write_chunk_end' : inconsistent dll linkage
> pngwtran.c
> pngwrite.c
> \packages\InsightCVS\Utilities\png\pngwrite.c(27) : warning C4273:
> 'png_write_info_before_PLTE' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(123) : warning C4273:
> 'png_write_info' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(290) : warning C4273:
> 'png_write_end' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(398) : warning C4273:
> 'png_convert_from_struct_tm' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(410) : warning C4273:
> 'png_convert_from_time_t' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(424) : warning C4273:
> 'png_create_write_struct' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(563) : warning C4273:
> 'png_write_init' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(572) : warning C4273:
> 'png_write_init_2' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(615) : warning C4273:
> 'png_write_init_3' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(679) : warning C4273:
> 'png_write_rows' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(696) : warning C4273:
> 'png_write_image' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(723) : warning C4273:
> 'png_write_row' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(892) : warning C4273:
> 'png_set_flush' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(900) : warning C4273:
> 'png_write_flush' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(953) : warning C4273:
> 'png_destroy_write_struct' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1077) : warning C4273:
> 'png_set_filter' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1183) : warning C4273:
> 'png_set_filter_heuristics' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1297) : warning C4273:
> 'png_set_compression_level' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1305) : warning C4273:
> 'png_set_compression_mem_level' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1313) : warning C4273:
> 'png_set_compression_strategy' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1321) : warning C4273:
> 'png_set_compression_window_bits' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1340) : warning C4273:
> 'png_set_compression_method' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1350) : warning C4273:
> 'png_set_write_status_fn' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1358) : warning C4273:
> 'png_set_write_user_transform_fn' : inconsistent dll linkage
> \packages\InsightCVS\Utilities\png\pngwrite.c(1370) : warning C4273:
> 'png_write_png' : inconsistent dll linkage
> pngwio.c