[ITK] Cannot build ITK using system GDCM

Vincent Daanen vincent.daanen at minmaxmedical.com
Wed Oct 28 11:07:06 EDT 2015


Hi,



I want to build itk using my system gdcm. It seems that the various
libraries are successfully built but lost of examples cannot be built
because of unresolved external symbols related to the zlib library.



Gdcm is 2.4.4

I tried with ITK-4.6.1 & ITK-4.8.1 and have the same errors.



I also found post on the mailing list related to this issue with ITK-4.5
but no way to solve it was proposed.



Is there a known way to resolve this issue ?



Thx



Vincent





Below is the output of the linker when trying to build the
AntiAliasBinaryImageFilter example

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

"D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj"
(cible par défaut) (135) ->(Link cible) ->

  gdcmDSED.lib(gdcmReader.obj) : error LNK2019: unresolved external symbol
inflate referenced in function "private: __int64 __cdecl
zlib_stream::basic_unzip_streambuf<char,struct std::char_traits<char>
>::unzip_from_stream(char *,__int64)" (?unzip_from_stream@
?$basic_unzip_streambuf at DU?char_traits at D@std@@@zlib_stream@@AEAA_JPEAD_J at Z)
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]

  gdcmDSED.lib(gdcmReader.obj) : error LNK2019: unresolved external symbol
inflateEnd referenced in function "public: virtual __cdecl
zlib_stream::basic_unzip_streambuf<char,struct std::char_traits<char>
>::~basic_unzip_streambuf<char,struct std::char_traits<char> >(void)"
(??1?basic_unzip_streambuf at DU?$char_traits at D@std@@@zlib_stream@@UEAA at XZ)
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]

  gdcmDSED.lib(gdcmReader.obj) : error LNK2019: unresolved external symbol
crc32 referenced in function "private: __int64 __cdecl
zlib_stream::basic_unzip_streambuf<char,struct std::char_traits<char>
>::unzip_from_stream(char *,__int64)" (?unzip_from_stream@
?$basic_unzip_streambuf at DU?$char_traits at D@std@@@zlib_stream@@AEAA_JPEAD_J at Z)
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]

  gdcmDSED.lib(gdcmWriter.obj) : error LNK2001: unresolved external symbol
crc32
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]

  gdcmDSED.lib(gdcmReader.obj) : error LNK2019: unresolved external symbol
inflateInit2_ referenced in function "public: __cdecl
zlib_stream::basic_unzip_streambuf<char,struct std::char_traits<char>
>::basic_unzip_streambuf<char,struct std::char_traits<char> >(class
std::basic_istream<char,struct std::char_traits<char> > &,int,unsigned
__int64,unsigned __int64)" (??0?$basic_unzip_streambuf at DU?$char_traits at D
@std@@@zlib_stream@@QEAA at AEAV?$basic_istream at DU?$char_traits at D@std@@@std@
@H_K1 at Z)
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]

  gdcmDSED.lib(gdcmWriter.obj) : error LNK2019: unresolved external symbol
deflate referenced in function "public: __int64 __cdecl
zlib_stream::basic_zip_streambuf<char,struct std::char_traits<char>
>::flush(void)" (?flush@?$basic_zip_streambuf at DU?$char_traits at D@std@
@@zlib_stream@@QEAA_JXZ)
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]

  gdcmDSED.lib(gdcmWriter.obj) : error LNK2019: unresolved external symbol
deflateEnd referenced in function "public: virtual __cdecl
zlib_stream::basic_zip_streambuf<char,struct std::char_traits<char>
>::~basic_zip_streambuf<char,struct std::char_traits<char> >(void)"
(??1?$basic_zip_streambuf at DU?$char_traits at D@std@@@zlib_stream@@UEAA at XZ)
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]

  gdcmDSED.lib(gdcmWriter.obj) : error LNK2019: unresolved external symbol
deflateInit2_ referenced in function "public: __cdecl
zlib_stream::basic_zip_streambuf<char,struct std::char_traits<char>
>::basic_zip_streambuf<char,struct std::char_traits<char> >(class
std::basic_ostream<char,struct std::char_traits<char> > &,int,enum
zlib_stream::EStrategy,int,int,unsigned __int64)"
(??0?$basic_zip_streambuf at DU?$char_traits at D@std@@@zlib_stream@@QEAA at AEAV
?$basic_ostream at DU?$char_traits at D@std@@@std@@HW4EStrategy at 1@HH_K at Z)
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]

  D:\InCAS\itk\4.8.1_x64_build\bin\Debug\AntiAliasBinaryImageFilter.exe :
fatal

error LNK1120: 7 unresolved externals
[D:\InCAS\itk\4.8.1_x64_build\Examples\Filtering\AntiAliasBinaryImageFilter.vcxproj]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20151028/5df4427a/attachment.html>


More information about the Community mailing list