[Insight-users] Compiling ITK on Windows

Luis Ibanez luis.ibanez@kitware.com
Tue, 04 Mar 2003 11:38:50 -0500


Hi Raghavendra,

It looks like you are opening the .dsp
project in Testing directly instead of
loading the main .dsw file.

It this the case ?

Please let us know,

Thanks

   Luis

BTW: The PNG and Zlib libraries should be
automatically added to the link list
when the  ITKIO library is referenced.


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


Raghavendra Chandrashekara wrote:
> Hi everyone,
> 
> I just downloaded the ITK project from the CVS repository and I managed to
> compile the libraries on Linux. When I tried to compile the libraries on
> Windows I got a number of linking error messages when the test projects were
> being built. This is an extract from one of the build logs (for the
> itkBasicFiltersTests project) with the error messages (they are the same for
> the other test projects):
> 
> Linking...
>    Creating library
> I:\packages\InsightCVS\Windows\VS.NET\bin\Debug\itkBasicFiltersTests.lib and
> object
> I:\packages\InsightCVS\Windows\VS.NET\bin\Debug\itkBasicFiltersTests.exp
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_destroy_read_struct referenced in function "public: virtual bool
> __thiscall itk::PNGImageIO::CanReadFile(char const *)"
> (?CanReadFile@PNGImageIO@itk@@UAE_NPBD@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_create_info_struct referenced in function "public: virtual bool
> __thiscall itk::PNGImageIO::CanReadFile(char const *)"
> (?CanReadFile@PNGImageIO@itk@@UAE_NPBD@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_create_read_struct referenced in function "public: virtual bool
> __thiscall itk::PNGImageIO::CanReadFile(char const *)"
> (?CanReadFile@PNGImageIO@itk@@UAE_NPBD@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_sig_cmp referenced in function "public: virtual bool __thiscall
> itk::PNGImageIO::CanReadFile(char const *)"
> (?CanReadFile@PNGImageIO@itk@@UAE_NPBD@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_read_end referenced in function "public: virtual void __thiscall
> itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_read_image referenced in function "public: virtual void
> __thiscall itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_get_rowbytes referenced in function "public: virtual void
> __thiscall itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_read_update_info referenced in function "public: virtual void
> __thiscall itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_set_swap referenced in function "public: virtual void __thiscall
> itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_set_tRNS_to_alpha referenced in function "public: virtual void
> __thiscall itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_get_valid referenced in function "public: virtual void __thiscall
> itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_set_gray_1_2_4_to_8 referenced in function "public: virtual void
> __thiscall itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_set_palette_to_rgb referenced in function "public: virtual void
> __thiscall itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_get_IHDR referenced in function "public: virtual void __thiscall
> itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_read_info referenced in function "public: virtual void __thiscall
> itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_set_sig_bytes referenced in function "public: virtual void
> __thiscall itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_init_io referenced in function "public: virtual void __thiscall
> itk::PNGImageIO::Read(void *)" (?Read@PNGImageIO@itk@@UAEXPAX@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_get_sCAL referenced in function "public: virtual void __thiscall
> itk::PNGImageIO::ReadImageInformation(void)"
> (?ReadImageInformation@PNGImageIO@itk@@UAEXXZ)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_get_channels referenced in function "public: virtual void
> __thiscall itk::PNGImageIO::ReadImageInformation(void)"
> (?ReadImageInformation@PNGImageIO@itk@@UAEXXZ)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_write_end referenced in function "protected: void __thiscall
> itk::PNGImageIO::WriteSlice(class std::basic_string,class std::allocator >
> &,void const *,unsigned long)"
> (?WriteSlice@PNGImageIO@itk@@IAEXAAV?$basic_string@DU?$char_traits@D@std@@V?
> $allocator@D@2@@std@@PBXK@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_write_image referenced in function "protected: void __thiscall
> itk::PNGImageIO::WriteSlice(class std::basic_string,class std::allocator >
> &,void const *,unsigned long)"
> (?WriteSlice@PNGImageIO@itk@@IAEXAAV?$basic_string@DU?$char_traits@D@std@@V?
> $allocator@D@2@@std@@PBXK@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_write_info referenced in function "protected: void __thiscall
> itk::PNGImageIO::WriteSlice(class std::basic_string,class std::allocator >
> &,void const *,unsigned long)"
> (?WriteSlice@PNGImageIO@itk@@IAEXAAV?$basic_string@DU?$char_traits@D@std@@V?
> $allocator@D@2@@std@@PBXK@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_set_sCAL referenced in function "protected: void __thiscall
> itk::PNGImageIO::WriteSlice(class std::basic_string,class std::allocator >
> &,void const *,unsigned long)"
> (?WriteSlice@PNGImageIO@itk@@IAEXAAV?$basic_string@DU?$char_traits@D@std@@V?
> $allocator@D@2@@std@@PBXK@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_set_compression_level referenced in function "protected: void
> __thiscall itk::PNGImageIO::WriteSlice(class std::basic_string,class
> std::allocator > &,void const *,unsigned long)"
> (?WriteSlice@PNGImageIO@itk@@IAEXAAV?$basic_string@DU?$char_traits@D@std@@V?
> $allocator@D@2@@std@@PBXK@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_set_IHDR referenced in function "protected: void __thiscall
> itk::PNGImageIO::WriteSlice(class std::basic_string,class std::allocator >
> &,void const *,unsigned long)"
> (?WriteSlice@PNGImageIO@itk@@IAEXAAV?$basic_string@DU?$char_traits@D@std@@V?
> $allocator@D@2@@std@@PBXK@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_destroy_write_struct referenced in function "protected: void
> __thiscall itk::PNGImageIO::WriteSlice(class std::basic_string,class
> std::allocator > &,void const *,unsigned long)"
> (?WriteSlice@PNGImageIO@itk@@IAEXAAV?$basic_string@DU?$char_traits@D@std@@V?
> $allocator@D@2@@std@@PBXK@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2019: unresolved external symbol
> __imp__png_create_write_struct referenced in function "protected: void
> __thiscall itk::PNGImageIO::WriteSlice(class std::basic_string,class
> std::allocator > &,void const *,unsigned long)"
> (?WriteSlice@PNGImageIO@itk@@IAEXAAV?$basic_string@DU?$char_traits@D@std@@V?
> $allocator@D@2@@std@@PBXK@Z)
> I:\packages\InsightCVS\Windows\VS.NET\bin\Debug\itkBasicFiltersTests.exe :
> fatal error LNK1120: 27 unresolved externals
> The problem seems to be with the png library but I am not sure why since the
> library has been successfully built and is being linked.Please can anyone
> help? I am using Visual Studio .NET on Windows 2000. CMake version is 1.6
> patch 5Thanks,Raghavendra
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>