[Insight-users] Compiling ITK on Windows

Raghavendra Chandrashekara rc3@doc.ic.ac.uk
Tue, 4 Mar 2003 16:24:12 -0000


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